简体   繁体   中英

Storing user-entered data from a Wix installer

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?

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM