WIX property value substitution and CAQuietExec

3

So far, I'm NOT finding WIX to be my favorite most intuitive, easy-to-use, language/system.

I created a custom dialog, entered data, and see the values in the install log.

MSI (c) (C8:A4) [14:42:37:137]: PROPERTY CHANGE: Modifying VARRADIOBUTTONENVIRONMENT property. Its current value is 'Dev'. Its new value: 'QA'.
MSI (c) (C8:A4) [14:42:41:448]: PROPERTY CHANGE: Modifying VARTEXTSETTINGSFILENAME property. Its current value is 'C:\Path\SettingsFileGenerator.xml'. Its new value: 'Test1234.txt'.

Later, when it comes time to use the value I see this:

Action ended 14:42:43: InstallFinalize. Return value 1.
MSI (s) (BC:F8) [14:42:43:676]: Doing action: QtExec1
Action 14:42:43: QtExec1. 
Action start 14:42:43: QtExec1.
MSI (s) (BC:F4) [14:42:43:682]: Invoking remote custom action. DLL: C:\Windows\Installer\MSIC4A7.tmp, Entrypoint: CAQuietExec
MSI (s) (BC!BC) [14:42:43:690]: PROPERTY CHANGE: Deleting QtExecCmdLine property. Its current value is '"[INSTALLLOCATION]XmlPreprocess.exe /i:web.config /e:[VARRADIOBUTTONENVIRONMENT] "'.
CAQuietExec:  Error 0x8007007b: Command failed to execute.
CAQuietExec:  Error 0x8007007b: CAQuietExec Failed
Action ended 14:42:43: QtExec1. Return value 3.
Action ended 14:42:43: INSTALL. Return value 3.
Property(S): StartIIS7ConfigTransaction = ScaConfigureIIs

And at the end when it dumps all the properties it shows this:

Property(S): VARRADIOBUTTONENVIRONMENT = QA Property(S): VARTEXTSETTINGSFILENAME = Test1234.txt Property(S): VerifyCurrentPropValueOfEnv = [VARRADIOBUTTONENVIRONMENT]

Here are fragments of my code. I just changed property ids to all-caps and added the secure="yes" based on another post I saw. I've tried with and without the Secure="yes".

        <Property Id="VARRADIOBUTTONENVIRONMENT" Secure="yes">Dev</Property>
        <Property Id="VARTEXTSETTINGSFILENAME" Secure="yes">C:\Path\SettingsFileGenerator.xml</Property>

        ...then later... 

                <Property Id="VerifyCurrentPropValueOfEnv" Value="[VARRADIOBUTTONENVIRONMENT]"/>
        <Property Id="QtExecCmdLine" Value="&quot;[INSTALLLOCATION]XmlPreprocess.exe /i:web.config /e:[VARRADIOBUTTONENVIRONMENT] &quot;"/>
        <CustomAction Id="QtExec1" BinaryKey="WixCA" DllEntry="CAQuietExec" Execute="immediate" Return="check"/>


<InstallExecuteSequence>
<Custom Action="QtExec1" After="InstallFinalize"><![CDATA[NOT(Installed)]]></Custom>
</InstallExecuteSequence>

At the end of the install, I see that XmlPreProcess.exe is installed in the installation directory.

Questions:

  1. Is there something I'm doing wrong to get the values to substitute?

  2. I'm using CAQuietExec because I was told it would log better errors and echo the output of the command window to the install log. I don't really care about not seeing the command window. I'm not sure how to find out what this means: "CAQuietExec: Error 0x8007007b: Command failed to execute.". I can't tell if this is a WIX error trying to call XmlPreprocess.exe or if it got into XmlPreprocess and then threw the error.

Thanks,

Neal Walters

wix
windows-installer
asked on Stack Overflow Jan 14, 2010 by NealWalters

1 Answer

8

Looking at the log extract I think I can see the problem, you've quoted the entire command line, try this instead:

<Property Id="QtExecCmdLine" Value="&quot;[INSTALLLOCATION]XmlPreprocess.exe&quot; /i:&quot;[INSTALLLOCATION]web.config&quot; /e:[VARRADIOBUTTONENVIRONMENT]"/>
answered on Stack Overflow Jan 14, 2010 by saschabeaumont

User contributions licensed under CC BY-SA 3.0