ARP entry not removed during Previous Version Uninstallation

Got a problem you cannot solve? Try here.
bokkie
Posts: 767
Joined: Sun Feb 08, 2009 6:30 am

Post by bokkie »

I'll chip in with my proverbial $2c.

There is a useful installation cleanup tool I got from Microsoft, called msicuu2.exe. It's been around for quite a long time but if you want to force agressive cleanups of taco'ed installation entries in the ARP it does a reasonably good job.

I've sometimes found that during testing that my ARP gets damaged so this utility often helps to get it back to normal again.
Peter. Smartly dressed, he still resembles an unmade bed.
InstallAware MVP
MarkElder
Posts: 35
Joined: Mon Nov 07, 2005 5:41 pm

Post by MarkElder »

Is it possible to schedule registry entries for delete on uninstall the same way you can do for files? If there were avaliable this would be easy to fix with one Delete Registry on uninstall line before the initial Apply Install.

I've been fighting with this today. It just looks unprofessional to have the left over entries in ARP.
MarkElder
Posts: 35
Joined: Mon Nov 07, 2005 5:41 pm

Post by MarkElder »

OK, this seems to be working for me. Does anyone have any reasons not to take this approach?

The other branch of the Uninstall registry seems to be written after the apply install command. So I am just writing out blank values during the install. Then they are automatically cleaned up by the uninstall. The blank values are getting overwritten with the real values.

It seems to correctly remove the ARP entry when re-running the original install, using ARP or when running a new version of the install.

Code: Select all

  Write Registry Key HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\$TITLE$\\InstallLocation, 
  Write Registry Key HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\$TITLE$\\Comments, 
  Write Registry Key HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\$TITLE$\\URLUpdateInfo, 
  Write Registry Key HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\$TITLE$\\HelpLink, 
  Write Registry Key HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\$TITLE$\\Contact, 
  Write Registry Key HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\$TITLE$\\Publisher, 
  Write Registry Key HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\$TITLE$\\ModifyPath, 
  Write Registry Key HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\$TITLE$\\UninstallString,
  Write Registry Key HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\$TITLE$\\DisplayName, 
  Write Registry Key HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\$TITLE$\\DisplayIcon, 
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Post by MichaelNesmith »

That's an excellent solution. Note that if ALLUSERS is FALSE, you want to write to HKCU instead.
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
BobRoush
Posts: 27
Joined: Sat Aug 26, 2006 12:26 pm

Post by BobRoush »

I tried jimo's suggested work around.
[quote="jimo"]
Read in the value of DisplayName from
HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\[Your App Prodcut Code} into PROD_NAME
Then:
Delete Registry HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\$PROD_NAME$

Looks like it works when the user running the installer is an admin, but not when the user is a Standard/power user group, and I presume not when they are a restricted/users group. I suspect delete registry requires the user to be an admin. I did not notice this looking at the help for the command, but I may have missed it. Anyway, can anyone confirm what I'm seeing or do I have another problem.
btw, all the above is on win XP.
Post Reply