Setup Doesn’t Automatically Remove a Custom Start Menu Folder at Uninstall Time Unless…

I have a solution in Visual Studio that includes a Setup project (MSI). The Setup project needs to install/uninstall a product in the same solution. However, for versioning purposes (we permit having different versions of the same product installed on the same computer at the same time), we wanted to have a Start menu folder for the product named like this: [Manufacturer] [ProductName] [ProductVersion].

To resolve this, we needed to not use the standard "User’s Programs Menu" folder available to be added in the File System section of the Setup, and instead we created a custom folder, using this default location: [ProgramMenuFolder][Manufacturer] [ProductName] [ProductVersion]. We put the shortcuts to the product in this menu.

Installation worked just fine. However, uninstalling succeeded also, but the custom folder was not removed from the system. To resolve that one, we needed to set AlwaysCreate property of the custom folder to true. After this setting and rebuilding the setup project, it worked! Strange but at least resolve the issue! Maybe somebody else would have the same issue in the future and hopefully this will help.

Clubhouse Tags: Clubhouse, How-to, Visual Studio, Setup

About Sorin Dolha

My passion is software development, but I also like physics.
This entry was posted in Computers and Internet. Bookmark the permalink.

3 Responses to Setup Doesn’t Automatically Remove a Custom Start Menu Folder at Uninstall Time Unless…

  1. D. Martín says:

    thank you very much, I was in a similar case and didn’t know what to do until I found this entry. It worked like a charm🙂.I have another problem tough, when running, my application also generates some report Xmls and stuff on the installation folder. When I uninstall my program via Add or Remove Programs, the root folder of my application is not deleted and you can find all these files generated by my application there. How can I force their removal ?

  2. Sorin says:

    I’m sorry but I don’t know if this is possible. As Setup didn’t actually install those files, they will not be removed, and the folder that includes them cannot be removed unless empty.If the report XML files are fixed, for example, if you always have 2 XMLs, named with fixed names, F1.xml and F2.xml, you can try adding empty files from installation time, to be removed when uninstalled.

Add a reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s