Restart Application with new Command-Line options?

J

james

Is there any way to use Application.Restart() with new command line
options? In the documentation on msdn they say Application.Restart()
reuses the original arguments.

THanks,
James
 
I

Ignacio Machin \( .NET/ C# MVP \)

Hi,


james said:
Is there any way to use Application.Restart() with new command line
options? In the documentation on msdn they say Application.Restart()
reuses the original arguments.

Well, you could spawn a new process passing the arguments you need and
terminating the original process.
 
J

james

Hi,




Well, you could spawn a new process passing the arguments you need and
terminating the original process.

Hmph... any idea how I could do this correctly? Our application only
lets one instance run at a time, so I would need to restart it after
the first instance closes... and I guess that would require another
project?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top