PDA

View Full Version : How to store information that can be used at uninstall time



agshah
06-02-2017, 05:42 PM
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.

agshah
06-06-2017, 04:31 PM
Hi,
Appreciate any input on this.

thanks.

Hysteresis
06-07-2017, 07:25 AM
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.

Cary R
06-07-2017, 05:39 PM
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? ;)

chad.petersen
06-08-2017, 11:33 AM
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

.

Cary R
06-09-2017, 03:20 PM
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. =)