开发者

How do I read app.config values and set properties in Wix

I have a .NET program that I've written a Wix installer for. I want to be able to update from a pre-Wix version. To do this, I'd like to 开发者_JAVA百科read from the installed program's app.config file. This will save the user from having to manually retype in all of these values. Is there anyway to do this? Thanks!


Neither MSI or WiX currently has built-in support for reading xml files, only writing. You'll have to write a custom action to read the values in. ( Extend AppsSearch )

In addition to this, I highly suggest you follow the pattern described here and adapt it for XML instead of registry:

http://robmensching.com/blog/posts/2010/5/2/The-WiX-toolsets-Remember-Property-pattern


One solution is to use the "Community MSI Extensions"

The custom action you're after is probably Xml_SelectNodeValue (there's an example on how to use it).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜