2009-04-25 16 views
0

folgende RunApplication nichtvb.net Problem Ausführen eines Befehls

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) 

Anregungen geschätzt dankbar

Antwort

2

einen Raum Setzen wäre funktionieren "cmd.exe/c" sollte „cmd.exe sein/c "

+0

Danke Mate, es hat funktioniert – Mark

Verwandte Themen