Visual Studio Setup Project installation kill existing process

1.3k views Asked by At

I made a Visual studio setup project. I did the setup of my setup. Later this was born of a desire to make application to the Board to upgrade. When you do a new installation and need to install again the current running application kill. In the first installation custom actions or vbscript I tried but it didn't work. What can I do for that.

2

There are 2 answers

1
PhilDW On

Visual Studio custom actions don't run until after everything is installed, and there is no support for running them early in the setup, so there's no VS support for what you want to do.

Is there an actual problem? People do installs all the time without shutting down a running process, even if the update affects that process. Windows will show a FilesInUse dialog for the user to shut it down, or continue and there may be a reboot.

0
Glenn Ferrie On

If your application has the appropriate access you can use this command.

taskkill -IM your-app.exe /T /F

The /T argument will kill the process and its child processes. The /F argument stands for 'Force'.

For more information on taskkill, run this command:

taskkill -?

Hope this helps!