0

I don't know how to start setup.exe with any arguments.

Actually a try this code but something goes wrong:

Dim p As New ProcessStartInfo
p.FileName = Application.StartupPath & "\Content\Office\2013_ALL\x86\setup.exe"
p.Arguments = Application.StartupPath & "\Content\Office\2013_ALL\x86\setup.exe" & "/configure .\365HomePrem86.xml"
p.WindowStyle = ProcessWindowStyle.Normal
Process.Start(p)

Let me know if you have an idea to fix it !

I want start setup.exe like this (.bat file) :

start setup.exe /configure .\365HomePrem86.xml
Zulu
  • 8,765
  • 9
  • 49
  • 56

1 Answers1

0

Try the below. You don't need the fullpath to setup.exe in the Arguments() property...just give it the arguments. Sometimes you also need to set the WorkingDirectory() for the app to work correctly:

    Dim p As New ProcessStartInfo
    p.FileName = Application.StartupPath & "\Content\Office\2013_ALL\x86\setup.exe"
    p.WorkingDirectory = System.IO.Path.GetDirectoryName(p.FileName)
    p.Arguments = "/configure .\365HomePrem86.xml"
    p.WindowStyle = ProcessWindowStyle.Normal
    Process.Start(p)
Idle_Mind
  • 38,363
  • 3
  • 29
  • 40