Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2007-03-29
5
Medium Priority
?
460 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
[X]
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
5 Comments
 
LVL 3

Accepted Solution

by:
kingtam2000 earned 2000 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Extention Methods in C# 3.0 by Ivo Stoykov C# 3.0 offers extension methods. They allow extending existing classes without changing the class's source code or relying on inheritance. These are static methods invoked as instance method. This…
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…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

715 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