COURSE of the MONTH

Check for process before Install App

Here is my scenario. A user installs the c# application from my website. After install the application starts (hidden) and puts an icon in the system tray. Now lets say the user goes back to the website and clicks install again. I want a way to check and kill the process if there is one before the install. I have the code to kill a process but not sure on where to put it before the install happens.

By "install" do you mean: you are generating an MSI or exe using an installer project, or is this something else?

0

choldenAuthor Commented: 2009-07-14

Thanks for the quick reply.

I right click to build the project. This creates the msi and exe in the release folder. When a user clicks the install button on the website it links to setup.exe and installs the application on the users computer.

I tried putting the code int the public override void Install before and that didn't work so I put it in the Commit and it works great. Now the only thing is that the killed process icon is still in the system tray until you move the mouse over it. Is there a way I can get rid of that icon when process is killed?