views:

693

answers:

2

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.

+1  A: 

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.

TheVillageIdiot
I did the samething what you told but it went to command prompt and from there it is uninstalling. Is there any otherway for this without going to command prompt.
ibrahimkhan
Sorry, Please use " start /B /l msiexec.exe /i {prod code}". This too shows command window but it is automatically closed, just a glimpse of it!
TheVillageIdiot
correction to above comment it is /x not /i :(
TheVillageIdiot
I did the samething. I am getting the command window. Instead of command window i want some window which is having unintall button.Thanks for the reply
ibrahimkhan
+1  A: 

did you have a look at this post? http://stackoverflow.com/questions/61691/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. http://stackoverflow.com/questions/926232/desktop-shortcut-icon-not-showing-in-web-setup-project

davsan