Go Back   PackageDeploy Application Packaging Forums > Package Development > Application Packaging > Windows MSI

Reply
 
LinkBack Thread Tools Display Modes
Old 03-15-2010, 06:54 PM   #1 (permalink)
JoderCoder
Guest
 
Posts: n/a
Default Uninstall registry keys from Users hive

Our application, at run time, write some keys to HKCU. We would like to
remove those keys at uninstall time.

The tricky part is that multiple users might run the app which means that
registry keys will be created under each users HKCU. Furthermore, uninstall
can be performed by admin silently using some deployment utility. How would
it be possible to remove the registry from each users hive?

Each user has a hive under HKEY_USERS\<SomeGUID>\Software. In theory it
should be possible to remove the reg keys once you know the GUIDs. Is there
any smart way of doing this with standard MSI tables or such?

If not, the only option I can think off is to loop through the reg keys
under HKEY_USERS, as always, in a custom action. It would be excellent if one
has written a (C++) custom action for that already - though Custom Action
method wouldnt be the ideal.

Thanks!
  Reply With Quote
Old 10-17-2011, 11:23 AM   #2 (permalink)
Junior Member
 
Join Date: Oct 2011
Posts: 3
Default Re: Uninstall registry keys from Users hive

Hi Joder,
I would suggest you to add a VBScript custom action which deletes the HKCU hive compeletely. This file be added into the MSI and then called through the Activesetup registry, such that it executes during every login/logoff so that it deletes the entire Hive for every user upon login. Hope this works, as i have implemented this in several situations.
abhi is offline   Reply With Quote
Old 10-17-2011, 11:31 AM   #3 (permalink)
Junior Member
 
Join Date: Oct 2011
Posts: 3
Default Re: Uninstall registry keys from Users hive

Hi,
I think you can try this method as i dont think there is a way to achive this through tables. You can write a script such that it deletes the HKCU hive which is created during the launch of this application. Include this as a part of this MSI installer. Then active setup registry included with the [product code] property replaced with the apth of this VBS created to delete the registry be called. Thus during every logoff\login, we see this vbs being called such that it deletes the HKCU hive in discussion for every user who logs in post installation

Note: P.S make a condition in the VBS such that it looks for its presence in the registry and then deletes.
Hope this works as i have myself used it in many situations.
abhi is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 12:30 PM.


vBulletin, Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
2007 - 2012 PackageDeploy.com