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

registry keys deleted when uninstalling


2 replies to this topic

wanglyih

wanglyih
  • Members
  • 2 posts

Posted 25 November 2002 - 12:09

Hi
I have an installer where i change some registry keys in

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\0,
where i change some security settings from my computer, to run some activex scripts (using RegDBSetKeyValueEx)

When uninstalling, it deletes the keys and then i have some problems with IE security.
The problem is that when uninstalling it deletes everything the installer have set.


Is it possible that when uninstalling not to delete these keys ? (maybe leave it as they are or re-setting

their values as they werw before installing).

Thank  you

EberhardH

EberhardH
  • Members
  • 137 posts

Posted 25 November 2002 - 13:20

Hi,

InstallShield removes everything it created before. Unfortunately, it cannot distinguish between writing an entry anew and modifying an existing one. Thus it always removes the entry at uninstall time!

A solution: prior to modifying an existing entry check if it does already exist. If so:
- copy the entry with a different name (create a different entry). You may disable LOGGING during this function call.
- Now modify the original entry.

But don't forget to extend your uninstall routine OnUninstalling... to rename the copied entry back to the original name. If you put the rename function into OnUninstalled..., the entry will already have been deleted, so no renaming can take place! If you disabled LOGGING: delete the entry on your own.

wanglyih

wanglyih
  • Members
  • 2 posts

Posted 25 November 2002 - 13:29

Thank you very much - i disabled logging, it's enough for what i have