Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

How to uninstall application cleanly??


2 replies to this topic

taojm

taojm
  • Members
  • 11 posts

Posted 10 October 2002 - 22:15

Hi, all,

I ran into an issue with uninstalling application cleanly on Windows XP Pro.

I have three user accounts, one with the administrator privilege and the other two with limited privilege. Say "admin" with administrator and "guest1" and "guest2" as limited privilege.

1)"admin" logged in to install an application.
2)And then "guest1" logged in and played with the application (wrote to some registry settings at HKEY_CURRENT_USERS\Software\<Company>\<Application>) and logged off.
3)And then "guest2" logged in and played with the application (wrote to some registry settings at HKEY_CURRENT_USERS\Software\<Company>\<Application>) and logged off.
3)And then "admin" logged in to uninstall this application.

We expected to see the uninstalltion removes/cleans all the registry settings for "guest1" and "guest2". So my installer traverses throught HKEY_USERS and deletes the keys for all users.

This does not work on Windows XP. For some reason, when the user logged off, it even does not show up at HKEY_USERS\<User>.

But if the "guest1" or "guest2" does not log out, and we use "Fast User Switching" to switch to the administrator account "admin" and do the uninstallation, their registry are all visible, and can be removed/cleaned up.

I am wondering how I can deal with such a situation. I mean, clean up the registry for all the users if they are not currently logged on.

Please suggest.
Thanks in advance!!
-J



Taco Bell

Taco Bell

    IS6 Expert

  • Moderators
  • 1,281 posts

Posted 11 October 2002 - 01:08

Humm, well that's unfortunate.

About the only thing which comes to mind is to have a Run entry in the HKLM which will makes a call to delete the leftover registry key(s).

To do so, the command would be "regedit /s YourRegFile.reg".  This reg file would contain the following information:

[-HKEY_CURRENT_USERS\Software\<Company>\<Application>]

Of course this reg file would need to be incorporate in your setup and configured to NOT be uninstalled.  Otherwise that would of course defeat the whole purpose.

An obvious downside is this command will be ran everytime, all the time, since nothing's around to stop it. :(


user posted image

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 11 October 2002 - 19:28

Did you look at the samples at InstallSite under
InstallScript Samples -> Operaring System -> Handle Files and Registry Entries in User Profiles
and
InstallScript Samples -> Registry and INI Files -> Load a User Hive Under the HKEY_USERS Key