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

3

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.