Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi,

I use this code in a loop to launch some files and wait for each one to close:

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 :)

Posted
Looks alright. Are you having any issues with it?

 

I heard that Arguments cannot have spaces and each switch should be sent separately, no I just wanna make sure :)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...