Left-over registry keys after uninstall

Got a problem you cannot solve? Try here.
pwall
Posts: 37
Joined: Fri Nov 11, 2011 11:30 am

Left-over registry keys after uninstall

Postby pwall » Fri Jul 05, 2013 12:35 pm

With a weekly loadbuilds, a new build is installed each week. Same product name, but it has a different build version of product key.
Our normal process on our test machines is to un-install the previous version and then install the new version.
This works as expected....no rocket science here.

However, I've just noticed that several registry keys are being left beind, specifically as an example:
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products\17C83D23F33061643882458182F3E4E1\InstallProperties
HKLM\SOFTWARE\Wow6432Node\Microsoft\CurrentVersion\Uninstall\{CE3DC025-3811-405F-AA8E-A58264D3B180}
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-21-4180957718-1631856028-3035985829-1121\Products\520CD3EC1183F504AAE85A28463D1B08\InstallProperties

These keys (and their values) get left behind during the un-install. These keys contain build version information, and once a new version of the product is installed, it's gets confusing.

Is there a way to have IA remove these automatically during un-install ? I could simply hard-code the values, however, I can not gaurentee the numbers used for the products (ie. 17C83D23F33061643882458182F3E4E1 or {CE3DC025-3811-405F-AA8E-A58264D3B180})

Thanks!

Patrick.

FrancescoT
Site Admin
Posts: 5273
Joined: Sun Aug 22, 2010 4:28 am

Re: Left-over registry keys after uninstall

Postby FrancescoT » Mon Jul 08, 2013 8:46 am

Dear Patrick,

just a question;
Are you deploying your package as MSI?

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

pwall
Posts: 37
Joined: Fri Nov 11, 2011 11:30 am

Re: Left-over registry keys after uninstall

Postby pwall » Mon Jul 08, 2013 9:05 am

Hi.

Yes, the package is being deployed as a msi.

Patrick.

FrancescoT
Site Admin
Posts: 5273
Joined: Sun Aug 22, 2010 4:28 am

Re: Left-over registry keys after uninstall

Postby FrancescoT » Tue Jul 09, 2013 3:04 am

Dear Patrick,

As you found, with MSI packages additional registry keys are created by the Windows Installer engine using a random GUID.
If the package is installed and removed using the MSIEXEC tool, those registry keys should be removed at un-install.

Unfortunately and due the above considerations, it is not easy to automatically remove those keys left.
The only possibility that you have, it is with searching any registry occurrence left to your package name.

Hope this helps you.

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

pwall
Posts: 37
Joined: Fri Nov 11, 2011 11:30 am

Re: Left-over registry keys after uninstall

Postby pwall » Tue Jul 09, 2013 5:21 am

Hi Francois.

Further testing with the msi, and yes, when using msiexec to install/uninstall, all registry keys are removed.
Using 'Programs & Features' to unistall will not remove all registry items. Odd.

Would this be addressed in a future release of InstallAware ? Not all msi's are installed/uninstalled with msiexec.

FrancescoT
Site Admin
Posts: 5273
Joined: Sun Aug 22, 2010 4:28 am

Re: Left-over registry keys after uninstall

Postby FrancescoT » Tue Jul 09, 2013 6:13 am

Dear Patrick,

unfortunately, it is not so easy and as you can understand, it is not an InstallAware limitation.

You can instruct your script to forcedly use MSIEXEC to remove the app ... but you can't control if the user uses the tool to install the package.

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

Martin H.
Posts: 5
Joined: Tue Oct 19, 2021 10:23 am

Re: Left-over registry keys after uninstall

Postby Martin H. » Fri Jan 21, 2022 8:52 am

I am running into the same problem of leaked registry entries after uninstalling a msi via 'Programs & Features'. It is not only the problem of obsolete registry entries polluting the registry. The uninstalls are definitively incomplete. I use a microsoft tool (MicrosoftProgram_Install_and_Uninstall.meta.diagcab) for cleaning corrupt uninstallations and it shows me every single uninstall of my product, installed with an InstallAware created msi, as incomplete. When updating our product, we uninstall the previous version and install the new one. On customer machines with our product installed (and many installed updates), the above microsoft tool shows up many, many entries of incomplete uninstallations.
I tried msi uninstallation with a test msi created by myself with an old InstallShield 2013 version. If I uninstall the InstallShield msi the same way I do it with an Installaware msi, there is absolutely nothing left back in the registry. They do it right. What do they different (better) as InstallAware does.

Following entries left back or affected in the registry after msi uninstall (product name "A3_MSITest"):

Computer\HKEY_CLASSES_ROOT\Applications\A3_MSITest.exe
Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Installer\Products\F4FEF7635723E774F83A8C6AC13EE45D
Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Installer\Products\F4FEF7635723E774F83A8C6AC13EE45D\SourceList
Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\UFH\SHC
Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{966D1C86-1C8C-4580-A657-EDF23C8E1FEB}
Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Compatibility Assistant\Store
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Applications\A3_MSITest.exe
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-21-1247012605-659804698-2259338125-1001\Products\F4FEF7635723E774F83A8C6AC13EE45D\InstallProperties
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{367FEF4F-3275-477E-8FA3-C8A61CE34ED5}
Computer\HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Session Manager
Computer\HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\bam\State\UserSettings\S-1-5-21-1247012605-659804698-2259338125-1001
Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager
Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\bam\State\UserSettings\S-1-5-21-1247012605-659804698-2259338125-1001

FrancescoT
Site Admin
Posts: 5273
Joined: Sun Aug 22, 2010 4:28 am

Re: Left-over registry keys after uninstall

Postby FrancescoT » Tue Jan 25, 2022 8:08 am

it may happen that orphan entries remains on the target system. Unfortunately, this depends directly on the MSI engine and it's not something easy to control.

You may use the approach described here (https://www.installaware.com/forums/viewtopic.php?f=2&t=10258&p=38753) to limit this behaviour, or even better, deploy an EXE installer instead of MSI.

Nowadays the exe output is preferred over the MSI. It's still an MSI based installer, but it can be double signed (digital signature), while an MSI package only allows a single signature.

Hope this helps you.
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

Martin H.
Posts: 5
Joined: Tue Oct 19, 2021 10:23 am

Re: Left-over registry keys after uninstall

Postby Martin H. » Tue Jan 25, 2022 10:40 am

Thank you for your fast response.
I tried the script provided with the linked post, but it takes no effekt. The entries still remaining in registry after uninstall. Exe installer is no option, because many of our customers would like to distribute the application centralized over their company network and thus they need a msi installer. And they are not amused polluting the registry of every PC in their company. I wonder what InstallShield does better to remove any crumb of an application from registry after uninstallation (there is absolutely nothing left in the registry).

Regards
Martin


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 13 guests