Making a uninstall shortcut with Visual studio setup project


A simple solution that I use:

Make a batch file (Uninstall.bat) with the following call
@echo off
msiexec /x {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}
(Path depends of your Windows version, check where your system32 folder is located)
That last part is the product code which you can find in the properties of your setup project.

  1. Add the Uninstall.bat in application folder

    right click on Application Folder > Add > File > Uninstall.bat



     
  2. Right click on "User's Programs Menu" and select "Create Shortcut to User's Programs Menu".


     
  3. Rename it to Uninstall
     
  4. Change the target of Uninstall shortcut to the Uninstall.bat.

    Uninstall shortcut > Properties Window > Target > Application Folder > Uninstall.bat


     
  5. Rebuild the project and you are done.

Up Next
    Ebook Download
    View all
    Learn
    View all
    F11Research & Development, LLC