visual studio 2012-Wix-无法在詹金斯构建时启动外部exe



我面临一个奇怪的问题。我已经构建了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"/>.

问题是当同一段代码被上传到詹金斯机器上时。生成成功,但当我在末尾单击"完成"时,外部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:UsersssachinAppDataLocalTempMSIF5F.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.

你怎么知道它没有启动?你确定它没有启动,或者你根本看不到它?詹金斯参加了自己的训练。因此,Jenkins派生的任何东西都将在自己的会话中运行,登录的用户会话不可见。

在这里阅读我关于如何让Jenkins触发.exe对用户会话可见的提示的答案:在Jenkins CI上打开Excel

相关内容

  • 没有找到相关文章

最新更新