How to stop a running process during an wise installation based un-install?

687 Views Asked by At

when i unwsied a project,if the main program of the project is running, then the un-install del all the floders and files except the main program.

how can i do,when i unwise a project if the main program is running .i want alert a dialog "are you sure to un-install this project when xxx.exe is running".

thanks.

1

There are 1 best solutions below

1
On

Use a batch file to kill the process, like:

taskkill /IM programname.exe

It will prompt the user are they sure or ask if they want to save changes. Use /F to force the process to close.