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

Installshield 5.5 uninstalling Registry keys and not values


8 replies to this topic

AdamBrunt

AdamBrunt
  • Members
  • 4 posts

Posted 18 July 2001 - 17:39

Hi all,

In my installshield project I have the following registry entry under my resources tab :

+ HKEY_LOCAL_MACHINE
   + Software\XXX\YYY\ZZZ
       Default = ""
       LAGADMIntraday = "abcdefgh"

When I install my product the above key is placed in the registry. However, when I uninstall the product, then for some reason the entire HKEY_LOCAL_MACHINE\Software\XXX\YYY key is removed and not just the LAGADMIntraday string value.

This causes a problem because the HKEY_LOCAL_MACHINE\Software\XXX\YYY key may already exist before my product is installed, meaning after mine is uninstalled some applications no longer run.

Why is InstallShield doing this ? Is there a 'flag' I am not setting correctly perhaps ?

Any help/solutions greatfully received.

Regards,

Adam Brunt


Ide Nentjes

Ide Nentjes
  • Members
  • 222 posts

Posted 19 July 2001 - 08:52

Hi Adam,

IS removes anything it installed, as long as LOGGING is enabled. So if it creates HKEY_LOCAL_MACHINE\Software\XXX\YYY , it will remove it upon uninstall. I am not quite sure what IS should do when part of the key is already present.

Have you checked IS also removes the entire key when HKEY_LOCAL_MACHINE\Software\XXX\YYY is already present ?

If so,  a possible solution is to call Disable(LOGGING) before you call CreateRegistrySet, and  Enable(LOGGING) afterwards. Problem with this is that your registry key will not be uninstalled.

HTH, Ide


Perotin

Perotin
  • Full Members
  • 407 posts

Posted 19 July 2001 - 11:26

If you use the Rssources tab in the IDE for adding registry keys and values, uninstall will remove the complete key added.
If you want to add subkeys and values only, use the REGDB... functions in your script, this will remove the added subkeys and values only.
(this "bug" removed the whole ODBC subkey on my test pc ...)

AdamBrunt

AdamBrunt
  • Members
  • 4 posts

Posted 19 July 2001 - 11:32

Quote
Quote: from Perotin on 11:26 am on July 19, 2001
If you use the Rssources tab in the IDE for adding registry keys and values, uninstall will remove the complete key added.
If you want to add subkeys and values only, use the REGDB... functions in your script, this will remove the added subkeys and values only.
(this "bug" removed the whole ODBC subkey on my test pc ...)

Perotin - Thanks for that (nasty about the ODBC stuff).

I also understand disabling logging may solve my problem ....

Due to the number registry entries I am making I would rather use the resources tab.

I have all my registry entries attached to various file groups, meaning (as I understand it) that registry entries attached to group A will only be entered if group A is installed, right ?

Ok, so in my setup.rul i have the following code :

Result = CreateRegistrySet( "" );

should I change this to a line for each filegroup and disable logging for the relevant ones ??

Thanks again.

Regards,

Adam


Perotin

Perotin
  • Full Members
  • 407 posts

Posted 19 July 2001 - 13:09

As I understand the reg/rge file processing, you create a number of registry sets (like "Registry-Set1") and can use
CreateRegistrySet( "Registry-Set1" );
to import this registry set into the registry.
CreateRegistrySet( "" );
will import *every* registry set!

btw: how do you attach registry sets to file groups?
I never heard of this ...


AdamBrunt

AdamBrunt
  • Members
  • 4 posts

Posted 19 July 2001 - 13:15

Quote
Quote: from Perotin on 1:09 pm on July 19, 2001
As I understand the reg/rge file processing, you create a number of registry sets (like "Registry-Set1") and can use
CreateRegistrySet( "Registry-Set1" );
to import this registry set into the registry.
CreateRegistrySet( "" );
will import *every* registry set!

btw: how do you attach registry sets to file groups?
I never heard of this ...

In the resources tab, right click on a registry entry and then choose modify (this is in IS5.53) and choose FileGroup


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 19 July 2001 - 15:54

In IS 6.2x you can right click on a key and mark it as "shared accross applications" which will not uninstall it if subkeys exist. And you could right click on a vlue and specify that it should not be uninstalled at all.

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 19 July 2001 - 15:57

Sorry, didn't notice that we are talking about IS5. You don't have this option in IS5. Here the only solution is to disable logging.

(However registry sets can be associated with file groups in IS 5.5)