Wix脚本安装 - 没有发生詹金斯

时间:2014-08-26 10:05:29

标签: jenkins wix windows-installer msiexec

我们正在使用Wix脚本通过Jenkins进行安装。我们的是64位操作系统。如果通过命令提示符执行,Windows \ system32桌面文件夹将显示为C:\ Users \ XXXXX \ Desktop \,它将正确安装。但如果我们运行Jenkins Desktop文件夹是C:\ Windows \ SysWOW64 \ config \ systemprofile \ Desktop \。在以后的情况下,安装和快捷方式创建是不合适的如何克服这个?可能是什么原因?预先感谢您的任何帮助。这是WIX SCRIPT

 <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
 <Product Id="*" UpgradeCode="PUT-GUID-HERE" Version="1.0.0.0" 
          Language="1033" Name="Product" Manufacturer="ABC">
    <Package InstallerVersion="200" Compressed="yes" 
             Comments="Windows Installer Package"/>
    <Media Id="1" Cabinet="product.cab" EmbedCab="yes" />

    <Directory Id="TARGETDIR" Name="SourceDir">
      <Directory Id="ProgramFilesFolder">
        <Directory Id="APPLICATIONROOTDIRECTORY" Name="Product">
          <Component Id="XYZ" Guid="*">
            <File Id="XYZ.exe" Source="D:\Repo\Solution\XYZ\bin\Debug\XYZ.exe">
            </File>
          </Component>
        </Directory>
      </Directory>

        <Directory Id="DesktopFolder" Name="XYZ">
          <Component Id="ApplicationShortcuts" Guid="*">
            <Shortcut Id="ApplicationShortcut1" Name="XYZ" 
                      Description="Product Shortcut"
                      Target="[APPLICATIONROOTDIRECTORY]XYZ.exe" 
                      WorkingDirectory="APPLICATIONROOTDIRECTORY"/>
            <RegistryValue Root="HKCU" Key="Software\[Manufacturer]\XYZ"
                      Name="installed" Type="integer" Value="1" KeyPath="yes"/>
            <RemoveFolder Id="DesktopFolder" On="uninstall"/>
          </Component>
        </Directory>
      </Directory>                           


  <Feature Id="DefaultFeature" Level="1">
    <ComponentRef Id="XYZ"/>
    <ComponentRef Id="ApplicationShortcuts"/>
  </Feature>

  <UIRef Id="WixUI_Mondo" />
  <UIRef Id="WixUI_ErrorProgressText" />
</Product>
</Wix>

1 个答案:

答案 0 :(得分:1)

似乎Jenkins正在运行SYSTEM帐户。如果你想以用户XXXXX的身份运行Jenkins,以便在用户XXXXX运行时安装正常,那么只需尝试使用相同的用户运行Jenkins。为此,请转到Run&gt;输入services.msc&gt;选择Jenkins&gt; (右键单击并选择)Properties&gt;点击Log On标签&gt;选择This account

现在输入要运行Jenkins的用户名及其密码。现在重启詹金斯。您现在可以尝试使用WiX脚本。