我按照tutorial中的说明执行了所有操作,但是我的可执行文件在产品安装完成后未启动。 有我的执行与模块的.msm交付,所以在.wxs文件的.msi一个细微差别我下面要启动应用程序:如何在安装后执行可执行文件(exe是由.msm提供的)
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product>
<!-- I omit here features and elements which are irrelevant to the question-->
<Feature Id="Configurator" Display="hidden" Level="1">
<MergeRef Id="MergeConfigurator"/>
</Feature>
<UI>
<UIRef Id="WixUI_Minimal"/>
<Publish Dialog="ExitDialog" Control="Finish" Event="DoAction"
Value="LaunchConfigurator">WIXUI_EXITDIALOGOPTIONALCHECKBOX = 1 and NOT Installed</Publish>
</UI>
<Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT" Value="!(loc.ExitDlgCheckBoxText)" />
<Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOX" Value="1"/>
<Property Id="WixShellExecTarget" Value="[#SystemConfigurator.exe.81c0fa8f-9a8e-49d8-9dc2-ce01ca163146]" />
<CustomAction Id="LaunchConfigurator" BinaryKey="WixCA" DllEntry="WixShellExec" Impersonate="yes" />
</Product>
<Fragment>
<DirectoryRef Id="TARGETDIR">
<Merge Id="MergeConfigurator" SourceFile="$(var.MergeModulesPath)\ConfiguratorSetup_$(var.Platform).msm" DiskId="1" Language="1033"/>
</DirectoryRef>
</Fragment>
</Wix>
为ID = WixShellExecTarget财产我都试图通过同时使用和不使用GUID(这是使用我的可执行文件的.msm的Package/@ Id)。 我用Orca打开我的.msi文件,看到我的可执行文件的确切ID(它是SystemConfigurator.exe.81c0fa8f-9a8e-49d8-9dc2-ce01ca163146,这就是为什么我通过这个非常有价值的原因)。
但它是什么错?
我登录安装过程中使用/ L * v选项,并有从日志中的部分:
Action 18:47:57: LaunchConfigurator.
Action start 18:47:57: LaunchConfigurator.
MSI (c) (54:68) [18:47:58:106]: Invoking remote custom action. DLL: C:\Users\AAGENO~1\AppData\Local\Temp\MSIB233.tmp, Entrypoint: WixShellExec
MSI (c) (54:08) [18:47:58:106]: Cloaking enabled.
MSI (c) (54:08) [18:47:58:106]: Attempting to enable all disabled privileges before calling Install on Server
MSI (c) (54:08) [18:47:58:106]: Connected to service for CA interface.
MSI (c) (54!04) [18:47:58:476]: Note: 1: 2715 2: SystemConfigurator.Client.exe.81c0fa8f-9a8e-49d8-9dc2-ce01ca163146
MSI (c) (54!04) [18:47:58:476]: Note: 1: 2715 2: SystemConfigurator.Client.exe.81c0fa8f-9a8e-49d8-9dc2-ce01ca163146
Action ended 18:47:58: LaunchConfigurator. Return value 3.
MSI (c) (54:34) [18:47:58:476]: Note: 1: 2205 2: 3: Error
MSI (c) (54:34) [18:47:58:476]: Note: 1: 2228 2: 3: Error 4: SELECT `Message` FROM `Error` WHERE `Error` = 2896
DEBUG: Error 2896: Executing action LaunchConfigurator failed.
谢谢,我用Orca检查了MSI文件 - GUID的文件密钥部分实际上是大写和下划线。我为WixShellExecTarget属性固定了值 - 现在它可以工作。但是...我可以确保在MSI文件表GUID始终是大写和下划线? –
虚线在MSI属性名称中不合法,公共属性必须大写,我认为合并API会产生大写和下划线,所以我相信你是安全的。 – PhilDW