Storing user-entered data from a Wix installer

724 Views Asked by At

I am creating a Wix installer and I would like to store some values that are set by the user during the installation process in such a way that I can read them at a later point in time. Obviously I could save these values in the registry but is there a better way to achieve this in Wix?

2

There are 2 best solutions below

1
On BEST ANSWER

What's so wrong with storing them in the registry?

Seriously :)

I've been in the business for 20+ years and have seen the evolution from Windows 3.1 to Windows 8.1... going back further to Commodore 64 / 128D / CPM / AmigaOS but we won't count that. I saw the evolution from INI to Registry to XML and personally I think the hatred for the registry was overhyped. I do dislike COM and COM registration but using the HKLM and HKCU hives to store company / product specific configuration information is just fine and it's wonderfully supported by windows Installer. It's the XML support that Windows Installer lacks. To a degree, WiX lacks XML support also as the last time I looked it could write XML data but not read it without additional custom actions.

So if you want a robust, solid installer, just use the registry.

2
On

I haven't used this feature. but you should investigate this blog entry from Rob Mensching: http://robmensching.com/blog/posts/2010/5/2/the-wix-toolsets-remember-property-pattern/

Here is another stackoverflow post: Advanced RememberProperty pattern