none
How to run an external EXE with command line options? RRS feed

  • Question

  • Hi,

     

    This is the code I'm using now to start another EXE from my application:

    Process.Start(My.Computer.FileSystem.SpecialDirectories.Temp & "\MyDownloadedApp.exe")

     

    This EXE has a command line option however - /check. How can I change this so that it runs with the /check command?

     

    Thanks!

    Saturday, July 24, 2010 12:08 AM

Answers

  • You need to use the Process.Start( ProcessStartInfo ) overload.  For example:
     
        Dim StartInfo as new ProcessStartInfo("path_to_your.exe")
        StartInfo.Arguments = "/check"
        Process.Start(StartInfo)

    --
    Mike
    • Marked as answer by koalacatcher Saturday, July 24, 2010 2:03 AM
    Saturday, July 24, 2010 12:34 AM

All replies

  • You need to use the Process.Start( ProcessStartInfo ) overload.  For example:
     
        Dim StartInfo as new ProcessStartInfo("path_to_your.exe")
        StartInfo.Arguments = "/check"
        Process.Start(StartInfo)

    --
    Mike
    • Marked as answer by koalacatcher Saturday, July 24, 2010 2:03 AM
    Saturday, July 24, 2010 12:34 AM
  • Thanks!
    Saturday, July 24, 2010 2:03 AM