Formatted data type (http://msdn2.microsoft.com/en-us/library/aa368609(VS.85).aspx):
"If a substring is enclosed in curly braces ({ }) and it contains one or more property names enclosed in square brackets ([ ]) then, if all the property names are valid, the text (with the resolved substitutions) is displayed without the curly braces." Alex -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dale Quigg Sent: Monday, April 14, 2008 4:35 PM To: wix-users@lists.sourceforge.net Subject: [WiX-users] MSI CustomAction - PowerShell Hi, I have a Type 51 QtExecCmdLine CustomAction with a Target of (all one line) "PowerShell.exe" -NoLogo -Noninteractive -Command "& { $fn='[MG_ROOT]MG_CONFIG' ; if (Test-Path $fn) {$fn_orig='$fn' + '.orig'; Copy-Item $fn $fn_orig; cat $fn_orig | % { $_ -replace '^local.*','local_ip_address=[MG_IP_LISTBOXVALUES]' > $fn } }else{ echo 'local_ip_address=[MG_IP_LISTBOXVALUES]' > $fn } }" When I look at my verbose install logs, I see; "PowerShell.exe" -NoLogo -Noninteractive -Command "& $fn='C:\Program Files\messagegate\MG_CONFIG' ; if (Test-Path $fn) {$fn_orig='$fn' + '.orig' ; Copy-Item $fn $fn_orig; cat $fn_orig | % { $_ -replace '^local.*','local_ip_address=10.10.1.5' > $fn }else echo 'local_ip_address=10.10.1.5' > $fn }" If you look very carefully, you see that a set of braces around the "else" portion of the command have been stripped. I don't understand why most of the braces come though fine, but these few don't. Thanks, Dale ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users