coder
coder

Reputation: 4283

wpf - start a process and exit application

The WPF application loads an xml file which has a list of Apps to install.

I use

System.Diagnostics.Process.Start(setupFilePath, commandLineArguments);

To install one of the Apps this wpf application needs to be exited. I tried the following code before calling System.Diagnostics.Process.Start(setupFilePath,commandLineArguments);

it still doesn't close.

System.Windows.Forms.Application.Exit();
System.Windows.Application.Current.Shutdown(1);

Upvotes: 0

Views: 1017

Answers (1)

Rachel
Rachel

Reputation: 132548

Try Environment.Exit() instead

Upvotes: 2

Related Questions