Creating an Uninstallation Shortcut in a Basic MSI Project

Before I explain this, I will remind you that the Vista Logo Guidelines recommend that you do not put an uninstallation shortcut to remove your application in the Start menu.  However, you may want to have one there anyway, and that is your choice.

Creating an uninstallation shortcut in your application folder is really simple.  Here are the steps:

  1. Go to the Shortcuts view, right-click the folder that you would like the shortcut to be in, and select New Shortcut to Preexisting file.
  2. Enter a suitable name for the shortcut, something like "Uninstall Product A".
  3. Go to the General Information view, Product Properties page, Product Code field, and copy the GUID.
  4. Go back to the Shortcuts view, select the shortcut you just created, and in the Arguments field, place the following: /x {Product Code GUID}
  5. Set the Advertised field to No.
  6. In the Target field, select [SystemFolder], and then add msiexec.exe to the end.  Like this: [SystemFolder]msiexec.exe
  7. In the Component field, select the component that you want the shortcut to be associated with.  You want to choose a component that will always be installed on the target system.  A good choice would be the component containing your application assembly.
  8. Set the Icon File field to a suitable icon.

That's all there is to it.

Determining if the User Has Administrator Privileges

Leave a Comment

Security Code: