Tutorial :How to include Uninstall MyProgram.exe in visual studio while creating package in c#


I have developed a wpf application and created setup for that. I am using windows installer for creating setup package. Now I want to include uninstall MyProgram.exe in start menu after installing my package.
I am able to add the exe to run my program after installation. I want to include uninstall MyProgram.exe, ReadMe file, Help File in start menu.
Any suggestions plz help me regarding this. Thanks in advance, Ibrahim.


did you have a look at this post? How to add uninstall option in .NET Setup Project?

You can create an uninstall shortcut and then add this shortcut to your start menu. the post below explains how to add a shortcut to user's desktop, you can get the idea and apply the same things for the start menu. desktop shortcut icon not showing in web setup project


When you create installation package, it is assigned unique id (Product Code, if i'm not forgetting). You can create a batch file with following line:

  @echo off    start /b /l msiexec.exe /x {Product Code}  

Now right click on file system tree (in files view of project) and include this batch file. Assign it a nice icon and create entry "Uninstall " to start menu folder for your application.

ps:- just type msiexec.exe in run or cmd window to get more options. pps:- Product Code is available in properties of your setup project. Select Setup Project in solution tree and open properties tab.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »