The WiX doc says that if type is MultiString then we can specify actions, append, prepend, write(default). what is mean by write action here? does it simply overwrites earlier entry, or adds with semicolon? if it just overwrites earlier entry, how it is different from type "string"
相关问题
- How does the setup bootstrapper detect if prerequi
- Wix: How can I set, at runtime, the text to be dis
- Mysql-installer showing error : Memoy could not be
- Wix variable name formats with spaces and other ch
- Cancel installation from my custom action
相关文章
- chained msi's/Bootstrapper/prerequisite?
- How do I require a value in a textbox in a Wix cus
- How to prevent WiX bundle with same UpgradeCode/Ve
- How do I pass a default 'install location'
- Running msiexec from a service (Local System accou
- Set InstallPath registry key using Visual Studio S
- Looking for a flexible windows installer product w
- Can I use msilib or other Python libraries to extr
I believe write overwrites the existing value(s) whether string or multi string, and enforces whatever new string type is specified. Multi string is different from string because you can add a list of stings via the
<MultiStringValue>
element (a regular string value can not do this - it cannot have MultiStringValue child elements):For multi string prepend adds the string at the start of the string list and append adds the string to the end of the string list. Multi strings are not semicolon delimited as far as I know, but a sequence of null-terminated strings, terminated by an empty string (
\0
). See Registry Value Types:Sample Multi String:
String1\0String2\0String3\0LastString\0\0
, and how it looks inregedit.exe
(with a contrasting regular string):Just dumping some sample test markup - warts and all :-) - you can use for testing if you'd like:
Some of the elements above will overwrite each other on install - as far as I understand that's what wasn't clear to you. Maybe dump this in your WiX source and give it a test spin.
By repeating several
RegistryValue
elements you can get the same effect as theMultiStringValue
elements.Try changing the last
RegistryValue
element'sAction="write"
toAction="append"
. Now it adds to the existing multi string instead of overwriting it. It should become:R2 sample multistring\0test1.1\0test1.2\0test1.3\0R3 sample multistring\0test2.1\0test2.2\0\0
.