Solved

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

Posted on 2007-03-29
5
451 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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

This article describes a simple method to resize a control at runtime.  It includes ready-to-use source code and a complete sample demonstration application.  We'll also talk about C# Extension Methods. Introduction In one of my applications…
Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

772 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