我需要让我的自定义操作作为 x64 位进程运行并使用 Visual Studio 2010。当我运行 msi 时,我在详细日志文件中看到以下条目:
你好,我是你的 32bit Elevated 自定义动作服务器
并且自定义操作由于错误的处理器架构而失败(我通过批处理文件调用 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=""[#Launch.cmd]" 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 的配置管理器中选择了 x64 版本。有谁知道出了什么问题?