2009-04-25 5 views
0

la runapplication suivante ne fonctionnera pasproblème de vb.net exécutant une commande

Private Sub RunApplication(ByVal ProgName As String) 
     // String of text as a command to execute with the command line interpreter 
     Dim strApplication As String = "cmd.exe/c" 
     Dim ProcessID As Integer 
     strApplication = strApplication & " " & ProgName & " > C:\tool.tmp" 

     // Execute the command but hide it from the user 
     Shell(strApplication, AppWinStyle.Hide, True) 

     // View the Output in notepad.exe 
     ProcessID = Shell("notepad.exe C:\tool.tmp", AppWinStyle.NormalFocus) 
     AppActivate(ProcessID) 

suggestions seraient grandement appréciés

Répondre

2

Mettez un espace "cmd.exe/c" devrait être « cmd.exe/c "

+0

thanx mate cela a fonctionné – Mark

Questions connexes