cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
agshah
Level 7

How to store information that can be used at uninstall time

Hi all,
During install time, I will be presenting the users a dialog with check boxes. Based on the user selection
I will perform certain configurations.

At uninstall time I need to unconfigure them. So at uninstall time, how do I know what check boxes user
had selected.

In a more general question, how to store information retrieved at install time so that those values or information
is available for use during uninstallation time.

thanks in advance.
Labels (1)
0 Kudos
(5) Replies
agshah
Level 7

Hi,
Appreciate any input on this.

thanks.
0 Kudos
Not applicable

Without knowing any details of your installation I would suggest either holding the 'tick-box' information in either a registry key or a 'settings' file. That way either the key or the settings file can be consulted during uninstall.
0 Kudos
Cary_R
Level 11

Presuming the values you want to save aren't sensitive (like a username & password), you could write them out to the registry and then pull them back in with a System Search to that registry value. I've done this in the past.

If you are trying to maintain a value that's sensitive (like a username & password), the aforementioned solution is going to be problematic.

When I had to do this in the past, I authored a custom action to encrypt/decrypt the values from either the registry or an *.xml file that my custom action created on the system and used either simple XOR obfuscation or AES256 encryption. This was actually a big undertaking, which used a deferred/system context custom action to write to the registry/xml file, and supported rollback, cleanup, install, uninstall, maintenance and was driven with a custom table. All of which was written in C# using the Wix DTF custom action support, and then either consumed by both Wix and Installshield installers.

Alas, I can't share this solution, but it'd be a great feature to include in the next version of InstallShield... Right guys? 😉
0 Kudos
chad_petersen
Level 9

But not WiX? You'll have to author that extension and submit for possible inclusion....lol.

I was going to add one thing to the OP - if the checkboxes represent native MSI capabilities then you should not have to do any extra work for the uninstall as MSI will reverse any native items for you during the uninstall.

Since you don't hint at what you are needing to configure I figure it could go either way - you are either using native MSI stuff or Custom stuff.

Chad

.
0 Kudos
Cary_R
Level 11

chad.petersen wrote:
But not WiX? You'll have to author that extension and submit for possible inclusion....lol.


I'd have to get approval from security & compliance teams to donate my solution to Wix. So that's unlikely.

But, if InstallShield comes out with their own feature (especially if it is fancier and more secure than what I wrote--which is likely), they'll have an advocate at my company to purchase the latest version of IS.

All told, it's not out of the park nuts to make a winking request here. 😃
0 Kudos