Launch process and wait

usvpn

Freshman
Joined
Apr 19, 2010
Messages
45
Hi,
I use this code in a loop to launch some files and wait for each one to close:
Visual Basic:
Dim MyProcess As System.Diagnostics.Process
MyProcess = New System.Diagnostics.Process()
MyProcess.StartInfo.FileName = ProcessPath
MyProcess.StartInfo.Arguments = "/quiet /norestart"
MyProcess.StartInfo.WindowStyle = ProcessWindowStyle.Normal
MyProcess.Start()
MyProcess.WaitForExit()
MyProcess.Close()
However, I am not sure if I used MyProcess.StartInfo.Arguments in the correct format.
To each file 2 arguments should be sent : /quiet and /norestart
I just put both in double quotations is that the right way?
Thanks :)
 
Back
Top