tags:

views:

82

answers:

1

the following runapplication won't work

 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)

any suggestions would be gratefully appreciated

+2  A: 

Put a space "cmd.exe/c" should be "cmd.exe /c"

dr. evil
thanx mate it worked
Mark