WIX自定义操作作为32位进程运行

时间:2012-08-23 19:03:15

标签: wix wix3.6

我需要将自定义操作作为x64位进程运行并使用Visual Studio 2010.当我运行msi时,我会在详细日志文件中看到以下条目:

您好,我是您的32位高架自定义操作服务器

并且自定义操作由于错误的处理器体系结构而失败(我通过批处理文件调用DISM.exe)。我的项目很简单:

                                                                                   

    <DirectoryRef Id="APPLICATIONROOTDIRECTORY" >
        <Component Id="Launch.cmd" Guid="{423CD408-F053-496B-8FA7-6C329A2F53BB}" Win64="yes">
            <File Id="Launch.cmd" Name="Launch.cmd" Source="C:\Temp\Build\MSU Wrapper for SCUP\Launch.cmd" KeyPath="yes" Checksum="yes" ProcessorArchitecture="x64"/>
        </Component>
        <Component Id="KB977453.cab" Guid="{E8ABB2AE-6F57-4153-B44C-E1083D6702B1}" Win64="yes">
            <File Id="KB977453.cab" Name="KB977453.cab" Source="C:\Temp\Build\MSU Wrapper for SCUP\KB977453.cab" KeyPath="yes" Checksum="yes" ProcessorArchitecture="x64"/>
        </Component>
    </DirectoryRef>

    <Feature Id="MainApplication" Title="Main Application" Level="1">
        <ComponentRef Id="Launch.cmd" />
        <ComponentRef Id="KB977453.cab" />
    </Feature>

    <CustomAction Id="BatchCmd" Property="BatchRun" Value="&quot;[#Launch.cmd]&quot; KB977453" Execute="immediate"/>
    <CustomAction Id="BatchRun" BinaryKey="WixCA" DllEntry="CAQuietExec" Execute="deferred" Return="check" Impersonate="no" />

    <InstallExecuteSequence>
        <Custom Action="BatchCmd" Before="BatchRun">NOT Installed</Custom>
        <Custom Action="BatchRun" After="InstallFiles">NOT Installed</Custom>
        <ScheduleReboot After="InstallFinalize" />
    </InstallExecuteSequence>

</Product>

我在Visual Studio的Configuration Manager中选择了x64版本。有没有人知道出了什么问题?

1 个答案:

答案 0 :(得分:1)

为x64自定义操作设置DllEntry = “CAQuietExec64”

http://wix.sourceforge.net/manual-wix3/qtexec.htm