Solved

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

Posted on 2007-03-29
5
448 Views
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.

Thanks
0
Comment
Question by:asmyatt
  • 3
  • 2
5 Comments
 
LVL 3

Accepted Solution

by:
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.
0
 
LVL 2

Author Comment

by:asmyatt
ID: 18820686
that worked great!

Thanks
0
 
LVL 2

Author Comment

by:asmyatt
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.

Thanks
0
 
LVL 3

Expert Comment

by:kingtam2000
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 http://www.pcreview.co.uk/forums/thread-1544595.php
0
 
LVL 2

Author Comment

by:asmyatt
ID: 18825399
thank you
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

760 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now