Persistent MSI Properties - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

rbcdata
Posts: 1
Joined: Mon Apr 07, 2008 10:37 pm

Persistent MSI Properties

Hi all,

I havent been able to find anything regarding the following problem. I hope you are able to help me.

I have added a userdefined dialogs to my installation. Properties like [SQLSERVERA] and [SQLSERVERB] are attached to edit fields on the dialog. The collected values are then written to a XML file.

During installation everything works fine and the entered data gets written to the XML file but if i do a repair the property [SQLSERVERA] and [SQLSERVERB] becomes unassigned and empty strings are written to the XML file thus breaking the installation.

Is there a way to persist the properties so that repair will work without having to reenter the property values?

Any help is appreciated.

Kind regards

René Bechmann
Ionut
Posts: 605
Joined: Tue Nov 22, 2005 11:29 am
Contact: Website

Re: Persistent MSI Properties

Hi René,

Windows Installer does not support persisting Property values between first time install/uninstall/reinstall. However, there are several methods that can be used to obtain this behaviour.

The simplest method would be to write all the Property values that must be persisted in the registry and then create Searches to retrieve them.

For instance, if you are using an Edit control having the attached Property MY_VALUE, you will create a registry value in the Registry page having the data set to [MY_VALUE] (under a key of your choice, say HKLM\SOFTWARE\[Manufacturer]\[ProductName]).

Then, in the Search page you will create a Search named MY_VALUE and as location you will use the same registry key as above (HKLM\SOFTWARE\[Manufacturer]\[ProductName] in the example).

The following page in the Windows Installer Team blog might prove useful.

Hope this helps.

Regards,
Ionut
Denis Toma
Advanced Installer Team
http://www.advancedinstaller.com/
AnneTheAgile
Posts: 61
Joined: Wed Jun 08, 2011 9:53 pm

Re: Persistent MSI Properties

hi! I notice in today's version of AIP, the checkbox "Set persistent property" will automatically create an -invisible- (to AIP's editor) registry entry at "Software\[Manufacturer]\[UpgradeCode]" (Possibly in each of the 4 hives). This is per;
http://www.advancedinstaller.com/user-g ... perty.html
Set persistent property
If you enable this option, the property will be stored in the registry and available in maintenance mode (repair, uninstall, etc.).

I wish it would show what it will/is writing in the GUI.

Also, though, did AIP choose to use [UpgradeCode] instead of [ProductCode] for any gotcha-type reason of which I should be aware? (As per above, AIP previously recommended the [ProductCode] location.)
thank you!
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Persistent MSI Properties

Hi,
I wish it would show what it will/is writing in the GUI.
It just stores the property and its raw value, so it can retrieve when needed.
Also, though, did AIP choose to use [UpgradeCode] instead of [ProductCode] for any gotcha-type reason of which I should be aware?
The upgrade code is the same for the entire family, i.e. different versions of your product. So being able to access the property from multiple versions of your application might be useful during certain upgrade scenarios.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”