cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
sucellus
Level 3

Unique Registry Keys for Multi-Instance InstallScript

I inherited an InstallScript project and I've been tasked with adding a number of additional features and am so close to having what I need. The project was originally single instance and one of the new requirements is that it be multi-instance.

During the install certain registry keys are created in HKCR. These keys seem to be only needed for upgrade and uninstall purposes. However, since this was not originally designed as multi-instance architecture, it simply creates the keys and overwrites them at each subsequent install. Then when you go to uninstall, for example, it removes things its not supposed to based on those keys.

Example:
1st Install:
HKCR\KeyA = Training

2nd Install:
HKCR\KeyA = Production

Uninstalling the 1st Instance (Training) causes parts of "Production" to be uninstalled!


I've seen references to szUninstallKey and tried creating the values in there since each instance gets its own unique key, however my InstallScript doesn't recognize szUninstallKey as a defined variable.

It doesn't really matter where the keys are located. How do I create a set of registry keys that is unique for each instance, and how do I reference those values in an InstallScript?

Thanks in advance!
Labels (1)
0 Kudos
(2) Replies
RobertDickau
Flexera Alumni

The InstallScript variable INSTANCE_GUID contains a unique ID for each instance, so perhaps incorporate that into each instance's registry data?
0 Kudos
sucellus
Level 3

That is exactly what I needed. THANKS!
0 Kudos