Probleme d'execution.

qbced Messages postés 50 Date d'inscription dimanche 9 février 2003 Statut Membre Dernière intervention 14 avril 2005 - 5 juil. 2003 à 19:01
ShareVB Messages postés 2676 Date d'inscription vendredi 28 juin 2002 Statut Membre Dernière intervention 13 janvier 2016 - 5 juil. 2003 à 20:40
J'ai windows xp comme explorateur et quand je veux faire un shell pour une execution ms dos sa ne fonctionne pas (que sa soit .bat ou .exe)! alors j'aimerais savoir si c'est normal et si il y a une autre possibilité d'ouvrir une exe msdos par visual basic? merci!

1 réponse

ShareVB Messages postés 2676 Date d'inscription vendredi 28 juin 2002 Statut Membre Dernière intervention 13 janvier 2016 26
5 juil. 2003 à 20:40
salut

en principe :

shell "c:\windows\system32\cmd.exe"

apres tu peux aussi :

Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long

ShellExecute Me.hwnd, vbNullString, "cmd", vbNullString, "C:", SW_SHOWNORMAL

ou

ShellExecute Me.hwnd, vbNullString, "c:\windows\system32\cmd.exe", vbNullString, "C:", SW_SHOWNORMAL

sinon c pas normal

voila

ShareVB
0
Rejoignez-nous