我面临一个奇怪的问题。我已经构建了wix安装程序,当安装完成后,将启动外部exe(MyEx.exe)。这在我的本地机器上工作得非常好。
我使用VS 2012来构建。
以下是一段代码
<Publish Dialog="MyExitDialog" Control="Finish" Event="EndDialog" Value="Return" Order="999">1</Publish>
<Publish Dialog="MyExitDialog" Control="Finish" Order="1" Event="DoAction" Value="LaunchApplication">LAUNCHAPPONEXIT and NOT Installed</Publish>
MyExitDialog.wxs文件
<?xml version="1.0"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
<UI>
<Dialog Id="MyExitDialog" Width="370" Height="270" Title="[ProductName]" NoMinimize="yes">
<Control Id="Finish" Type="PushButton" X="236" Y="243" Width="56" Height="17" Default="yes" Cancel="yes" Text="!(loc.WixUIFinish)" />
<Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Disabled="yes" Text="!(loc.WixUICancel)" />
<Control Id="Bitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="234" TabSkip="no" Text="!(loc.ExitDialogBitmap)" />
<Control Id="Back" Type="PushButton" X="180" Y="243" Width="56" Height="17" Disabled="yes" Text="!(loc.WixUIBack)" />
<Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" Height="0" />
<Control Id="Description" Type="Text" X="135" Y="70" Width="220" Height="20" Transparent="yes" NoPrefix="yes" Text="!(loc.ExitDialogDescription)" />
<Control Id="Title" Type="Text" X="135" Y="20" Width="220" Height="60" Transparent="yes" NoPrefix="yes" Text="!(loc.ExitDialogTitle)" />
<Control Id="LaunchCheckBox" Type="CheckBox" X="10" Y="243" Width="170" Height="17" Property="LAUNCHAPPONEXIT" Hidden="yes" CheckBoxValue="1" Text="Launch NetappAgent Configuration">
<Condition Action="show">NOT Installed</Condition>
</Control>
</Dialog>
<InstallUISequence>
<Show Dialog="MyExitDialog" OnExit="success" />
</InstallUISequence>
<AdminUISequence>
<Show Dialog="MyExitDialog" OnExit="success" />
</AdminUISequence>
</UI>
</Fragment>
</Wix>
和MyMainFile.wxs
<Condition Message="!(loc.InstallationPrivMessage)">Privileged</Condition>
<Property Id="WixShellExecTarget" Value="$(var.SourceDir)\MyExe.exe" />
<CustomAction Id="LaunchApplication" BinaryKey="WixCA" DllEntry="WixShellExec"/>.
问题是在Jenkins机器上上传同一段代码。构建成功但是当我在最后点击完成时,外部exe(MyExe.exe)无法启动。
我使用MSBuild v4.0.30319和Ant 1.9.0。 我不知道我应该在哪里开始调试。任何帮助将不胜感激。
更新
经过进一步调查,我发现$(var.SourceDir)\ MyExe.exe可能是罪魁祸首。我认为在编译时有效,而不是在构建时。
我也尝试使用[#MyExe.exe],但即便没用。
MSI (c) (EC:68) [16:56:37:679]: Doing action: MyExitDialog
Action 16:56:37: MyExitDialog.
Action start 16:56:37: MyExitDialog.
Action 16:56:37: MyExitDialog. Dialog created
MSI (c) (EC:70) [16:56:48:138]: Doing action: LaunchApplication
Action 16:56:48: LaunchApplication.
Action start 16:56:48: LaunchApplication.
MSI (c) (EC:10) [16:56:48:153]: Invoking remote custom action. DLL: C:\Users\ssachin\AppData\Local\Temp\MSIF5F.tmp, Entrypoint: WixShellExec
MSI (c) (EC!B0) [16:56:48:191]: Note: 1: 2715 2: MyExe.exe
MSI (c) (EC!B0) [16:56:48:191]: Note: 1: 2715 2: MyExe.exe
Action ended 16:56:48: LaunchApplication. Return value 3.
DEBUG: Error 2896: Executing action LaunchApplication failed.
The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2896. The arguments are: LaunchApplication, ,
Action ended 16:56:48: MyExitDialog. Return value 3.
Action ended 16:56:48: INSTALL. Return value 1.
MSI (c) (EC:68) [16:56:48:196]: Destroying RemoteAPI object.
MSI (c) (EC:54) [16:56:48:197]: Custom Action Manager thread ending.
答案 0 :(得分:0)
你怎么知道它没有推出?你确定它没有发布,或者你根本看不到它?詹金斯参加了自己的会议。因此,Jenkins生成的任何东西都会在它自己的会话中运行,登录用户会话时不可见。
在此处阅读我的答案,了解如何让Jenkins触发.exe
对用户会话可见: Open Excel on Jenkins CI