0

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

1 Answer 1

2

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

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.