Uninstall path for the 'Remove' button in Add/Remove programs

Posted on 2007-03-29
Last Modified: 2010-05-18
I have written a custom installer application that executes an MSI file to register some dlls and copy the program files to the users machine. When the MSI runs it adds the program name to the Add/Remove programs list in the control panel. I want to modify the path of the program that the 'Remove' button executes so that it executes my custom installer program, not the MSI that is packaged with my installer. Can anyone please shed some light on this? I have looked through the registry, but have not been successful, it seems no matter what I change in the registry, the 'Remove' button always executes the MSI.

Question by:asmyatt
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2

Accepted Solution

kingtam2000 earned 500 total points
ID: 18820418
The problem is that MSI installations override the UninstallString key in the registry.  The key WindowsInstaller, when set to 1, automatically uses the msiexec /x to uninstall, ignoring the UninstallString key.  In order to use the UninstallString key, set WindowsInstaller to 0 to make the add/remove programs use the UninstallString key, which you can set to your custom installer, to uninstall the program.

If that doesn't work or if any problems occur, just post a comment.

Author Comment

ID: 18820686
that worked great!


Author Comment

ID: 18822848
Can you tell me why it adds two entries in the Add/Remove programs list. When the 'Remove' button is clicked for the first entry it executes my installer, but when the 'Remove' button is clicked for the second entry it executes the MSI. Is there another key that I need to change so that the second entry does not show up.


Expert Comment

ID: 18825213
Yeah, sorry about that, I just had a search and realised that method was incomplete.  In order to do it without a second entry showing up, you need to create your own entry, which could just be a copy of the key, but with the WindowsInstaller set to 0 and the UninstallString pointing to your own installer, and set ARPSYSTEMCOMPONENT in the Windows Installer properties to 1.  This prevents the windows installer version from showing up on Add/Remove programs by setting SystemComponent in the registry to be 1.  I got this information off

Author Comment

ID: 18825399
thank you

Featured Post

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Ivo
C# And Nullable Types Since 2.0 C# has Nullable(T) Generic Structure. The idea behind is to allow value type objects to have null values just like reference types have. This concerns scenarios where not all data sources have values (like a databa…
This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

624 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question