Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/wix/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Installation WiX多实例安装错误(错误代码为2755。参数为:1639)_Installation_Wix_Instance_Multiple Instances_Wix3.6 - Fatal编程技术网

Installation WiX多实例安装错误(错误代码为2755。参数为:1639)

Installation WiX多实例安装错误(错误代码为2755。参数为:1639),installation,wix,instance,multiple-instances,wix3.6,Installation,Wix,Instance,Multiple Instances,Wix3.6,我一直在为我的安装创建多个实例,这是我到目前为止的代码注意:明显的数据已被删除。我打开UI,一直到安装阶段,当它点击进度对话框时,我收到一条错误消息 我知道这不是我的msiexec版本或服务,因为我已经检查了所有内容。有人能告诉我到底是什么导致了这个问题吗 <!--Multi-instance--> <InstanceTransforms Property="INSTANCEID"> <Instance Id="Inst1" Inst1PProductductC

我一直在为我的安装创建多个实例,这是我到目前为止的代码注意:明显的数据已被删除。我打开UI,一直到安装阶段,当它点击进度对话框时,我收到一条错误消息

我知道这不是我的msiexec版本或服务,因为我已经检查了所有内容。有人能告诉我到底是什么导致了这个问题吗

<!--Multi-instance-->
<InstanceTransforms Property="INSTANCEID">
  <Instance Id="Inst1" Inst1PProductductCode="**GUID**" Inst1PProductductName="Inst1PProductductInst1"/>
  <Instance Id="Inst1Stage" Inst1PProductductCode="**GUID**" Inst1PProductductName="Inst1PProductductInst1Stage"/>
  <Instance Id="Inst3" Inst1PProductductCode="**GUID**" Inst1PProductductName="Inst1PProductductInst3"/>
  <Instance Id="Inst4" Inst1PProductductCode="**GUID**" Inst1PProductductName="Inst1PProductductInst4"/>
  <Instance Id="Other" Inst1PProductductCode="**GUID**" Inst1PProductductName="Inst1PProductductOther"/>
  <Instance Id="Other2" Inst1PProductductCode="**GUID**" Inst1PProductductName="Inst1PProductductOther2"/>
  <Instance Id="Other3" Inst1PProductductCode="**GUID**" Inst1PProductductName="Inst1PProductductOther3"/>
</InstanceTransforms>

<!--Registering Multiple Instances-->
<Property Id="Inst1INSTALLEDInst1PProductductCODE">
  <RegistrySearch Id="Inst1Inst1PProductductCodeLookUp" Key="$(var.RegKeyDir)\Inst1" Name="**GUID**" Productot="HKLM" Type="raw"/>
</Property>
<Property Id="Inst1STAGEINSTALLEDInst1PProductductCODE">
  <RegistrySearch Id="Inst1StageInst1PProductductCodeLookUp" Key="$(var.RegKeyDir)\Inst1Stage" Name="**GUID**" Productot="HKLM" Type="raw"/>
</Property>
<Property Id="Inst3INSTALLEDInst1PProductductCODE">
  <RegistrySearch Id="Inst3Inst1PProductductCodeLookUp" Key="$(var.RegKeyDir)\Inst3" Name="**GUID**" Productot="HKLM" Type="raw"/>
</Property>
<Property Id="Inst4INSTALLEDInst1PProductductCODE">
  <RegistrySearch Id="Inst4Inst1PProductductCodeLookUp" Key="$(var.RegKeyDir)\Inst4" Name="**GUID**" Productot="HKLM" Type="raw"/>
</Property>
<Property Id="OTHERINSTALLEDInst1PProductductCODE">
  <RegistrySearch Id="OtherInst1PProductductCodeLookUp" Key="$(var.RegKeyDir)\Other" Name="**GUID**" Productot="HKLM" Type="raw"/>
</Property>
<Property Id="OTHER2INSTALLEDInst1PProductductCODE">
  <RegistrySearch Id="Other2Inst1PProductductCodeLookUp" Key="$(var.RegKeyDir)\Other2" Name="**GUID**" Productot="HKLM" Type="raw"/>
</Property>
<Property Id="OTHER3INSTALLEDInst1PProductductCODE">
  <RegistrySearch Id="Other3Inst1PProductductCodeLookUp" Key="$(var.RegKeyDir)\Other3" Name="**GUID**" Productot="HKLM" Type="raw"/>
</Property>

<!--Installation Files-->
<Directory Id="TARGETDIR" Name="SourceDir">
  <Directory Id="PProductgramFilesFolder" Name="PProductgramFiles">
    <Directory Id="INSTALLDIR" Name="Inst1PProductduct">
      <Directory Id="Inst1PProductductWEB"> <!--Name="Inst1PProductduct(Inst1) Web"-->
        <!--RegCompCode-->

        <!--IISWebPoolCode-->
        <Component Id="IISWebPool" Guid="$(var.IISWebPoolCode)" Win64="no" MultiInstance="yes" Permanent="yes">
          <iis:WebAppPool Id="Inst1PProductduct" Name="Inst1PProductductAppPool" ManagedRuntimeVersion="[NET_VER]" IdleTimeout="0" RecycleMinutes="0" ManagedPipelineMode="integrated"/>
          <CreateFolder />
        </Component>

        <!--IISWebRegCode-->
        <Component Id="IISWebReg" Guid="$(var.IISWebRegCode)" KeyPath="yes" MultiInstance="yes">
          <iis:WebVirtualDir Id="ProductVirtualDir" Alias="[SHORTCUT]" Directory="Inst1PProductductWEB" WebSite="DefaultWebSite" >
            <iis:WebApplication Id="ProductWebApp" Name="[SHORTCUT]" WebAppPool="Inst1PProductduct" />
            <iis:WebDirPProductperties Id="ProductWebDir" AnonymousAccess="yes" WindowsAuthentication="yes" />
          </iis:WebVirtualDir>
          <CreateFolder />
        </Component>

        <!--WebDataFilesCode-->
        <Component Id="WebDataFiles" Guid="$(var.WebDataFilesCode)" MultiInstance="yes">              
          <File Id="clientaccesspolicy.xml" Source="$(var.Inst1PProductductWebFiles)\clientaccesspolicy.xml" Vital="yes" DiskId="1"/>
          <File Id="Default.aspx" Source="$(var.Inst1PProductductWebFiles)\Default.aspx" Vital="yes" DiskId="1"/>
          <File Id="Global.asax" Source="$(var.Inst1PProductductWebFiles)\Global.asax" Vital="yes" DiskId="1"/>
          <File Id="Global.asax.cs" Source="$(var.Inst1PProductductWebFiles)\Global.asax.cs" Vital="yes" DiskId="1"/>
          <File Id="Help.aspx" Source="$(var.Inst1PProductductWebFiles)\Help.aspx" Vital="yes" DiskId="1"/>
          <File Id="Help.aspx.cs" Source="$(var.Inst1PProductductWebFiles)\Help.aspx.cs" Vital="yes" DiskId="1"/>
          <File Id="Print.aspx" Source="$(var.Inst1PProductductWebFiles)\Print.aspx" Vital="yes" DiskId="1"/>
          <File Id="Report.aspx" Source="$(var.Inst1PProductductWebFiles)\Report.aspx" Vital="yes" DiskId="1"/>
          <File Id="Inst1PProductductHelp.aspx" Source="$(var.Inst1PProductductWebFiles)\Inst1PProductductHelp.aspx" Vital="yes" DiskId="1"/>
          <File Id="Silverlight.js" Source="$(var.Inst1PProductductWebFiles)\Silverlight.js" Vital="yes" DiskId="1"/>
          <File Id="WcfPortal.svc" Source="$(var.Inst1PProductductWebFiles)\WcfPortal.svc" Vital="yes" DiskId="1"/>
          <File Id="WcfSecurePortal.svc" Source="$(var.Inst1PProductductWebFiles)\WcfSecurePortal.svc" Vital="yes" DiskId="1"/>
          <File Id="Web.sample.config" Source="$(var.Inst1PProductductWebFiles)\Web.sample.config" Vital="yes" DiskId="1"/>
          <File Id="WpfWcfPortal.svc" Source="$(var.Inst1PProductductWebFiles)\WpfWcfPortal.svc" Vital="yes" DiskId="1"/>
          <File Id="Web.config" KeyPath="yes" Source="$(var.Inst1PProductductWebFiles)\Web.config" Vital="yes" />
          <util:XmlFile Id="SetConn" Action="setValue" ElementPath="/configuration/connectionStrings/add[\[]@name='Inst1PProductductConnectionString'[\]]/@connectionString"
                        Value="Data Source=[SERVERNAME];Initial Catalog=[DBNAME];Password=&quot;encrypted:kUrWr7n47L3akvAu89Evew==&quot;;User ID=Productster;"
                        File="[#Web.config]" SelectionLanguage="XPath" Sequence="1" />
        </Component>

        <!--RegisterFolderCode-->
        <!--<Component Id="RegisterFolder" Guid="$(var.RegisterFolderCode)">
          <RegistryValue Id="AppAlias" Name="AppAlias" Productot="HKLM" Key="SOFTWARE\Inst1PProductduct\Inst1PProductductWeb(Inst1)" Type='string' Value="[SHORTCUT]" KeyPath='yes'/>
          <RegistryValue Id="VirtualDir" Name='VirtualDir' Productot='HKLM' Key='SOFTWARE\Inst1PProductduct\Inst1PProductductWeb(Inst1)' Type='string' Value='[SHORTCUT]'/>
        </Component>-->

        <!--Registering Individual Instances-->
        <Component Id="Registry_Inst1" Guid="$(var.RegInst1Comp)">
          <Condition><![CDATA[INSTANCEID = "Inst1"]]></Condition>
          <RegistryKey Productot="HKLM" Key="$(var.RegKeyDir)\[INSTANCEID]" >
            <RegistryValue Id="Presence_Inst1" Action="write" Name="Inst1Inst1PProductductCode" Value="[Inst1PProductductCode]" Type="string" KeyPath="yes" />
          </RegistryKey>
        </Component>
        <Component Id="Registry_Inst1Stage" Guid="$(var.RegInst1StageComp)">
          <Condition><![CDATA[INSTANCEID = "Inst1Stage"]]></Condition>
          <RegistryKey Productot="HKLM" Key="$(var.RegKeyDir)\[INSTANCEID]" >
            <RegistryValue Id="Presence_Inst1Stage" Action="write" Name="Inst1StageInst1PProductductCode" Value="[Inst1PProductductCode]" Type="string" KeyPath="yes" />
          </RegistryKey>
        </Component>
        <Component Id="Registry_Inst3" Guid="$(var.RegInst3Comp)">
          <Condition><![CDATA[INSTANCEID = "Inst3"]]></Condition>
          <RegistryKey Productot="HKLM" Key="$(var.RegKeyDir)\[INSTANCEID]" >
              <RegistryValue Id="Presence_Inst3" Action="write" Name="Inst3Inst1PProductductCode" Value="[Inst1PProductductCode]" Type="string" KeyPath="yes" />
          </RegistryKey>
        </Component>
      </Directory>
    </Directory>
  </Directory>
</Directory>

<!--Create web applicaton under Default Website-->
<iis:WebSite Id="DefaultWebSite" Description="[SHORTCUT]" Directory="Inst1PProductductWEB">
  <iis:WebAddress Id="AllUnassigned" Port="80" />
</iis:WebSite>

<Feature Id="$(var.Feature)Install" 
         Title="$(var.InstallName) Installer" 
         Description="$(var.InstallName) Setup Wizard"
         Display="expand" 
         Level="1" 
         ConfigurableDirectory="Inst1PProductductWEB">
  <Feature Id="$(var.Feature)" Title="$(var.InstallName)" Description="$(var.InstallName)" Level="1">
    <ComponentRef Id="IISWebPool" />
    <ComponentRef Id="IISWebReg" />
    <ComponentRef Id="WebDataFiles" />
    <ComponentRef Id="BinFiles" />
    <ComponentRef Id="ClientBinFiles" />
    <ComponentRef Id="Registry_Inst1" />
    <ComponentRef Id="Registry_Inst1Stage" />
    <ComponentRef Id="Registry_Inst3" />
  </Feature>
</Feature>

<!--UI-->
<UI Id="Installer_UI">
  <UIRef Id="WixUI_Mondo"/>
  <Property Id="WIXUI_INSTALLER" Value="TARGETDIR"/>

  <DialogRef Id="InstallerUIDlg"/>
  <DialogRef Id="InstallDlg"/>
  <DialogRef Id="InstallPProductgressDlg"/>

  <Publish Dialog="ExitDialog" ContProductl="Finish" Event="EndDialog" Value="Return" Order="999"></Publish>
  <Publish Dialog="LicenseAgreementDlg" ContProductl="Next" Event="NewDialog" Value="InstallerUIDlg" Order="2">LicenseAccepted = "1"</Publish>
  <Publish Dialog="SetupTypeDlg" ContProductl="Back" Event="NewDialog" Value="InstallerUIDlg" Order="2">1</Publish>
  <Publish Dialog="PProductgressDlg" ContProductl="Next" Event="NewDialog" Value="InstallerUIDlg" Order="2">1</Publish>

</UI>
<UIRef Id="WixUI_Common"/>

<!--Custom Actions-->
<CustomAction Id="SetInst1PProductductName" Property="Inst1PProductductName" Value="[[Inst1PProductductNameProperty][INSTANCEID]]" />
<CustomAction Id="SetInstanceDirectory" Property="Inst1PProductductWEB" Value="[INSTALLDIR][INSTANCEID]\"/>
<CustomAction Id="SetTransforms" Property="TRANSFORMS" Value="{:[INSTANCEID];}[TRANSFORMS]" />
<CustomAction Id="SetNewInstance" Property="MSINEWINSTANCE" Value="1" />

<CustomAction Id="SetInstance_Inst1" Property="INSTANCEID" Value="Inst1" />
<CustomAction Id="SetInstance_Inst1Stage" Property="INSTANCEID" Value="Inst1Stage" />
<CustomAction Id="SetInstance_Inst3" Property="INSTANCEID" Value="Inst3" />
<CustomAction Id="SetInstance_Inst4" Property="INSTANCEID" Value="Inst4" />
<CustomAction Id="SetInstance_Other" Property="INSTANCEID" Value="Other" />
<CustomAction Id="SetInstance_Other2" Property="INSTANCEID" Value="Other2" />
<CustomAction Id="SetInstance_Other3" Property="INSTANCEID" Value="Other3" />

<InstallExecuteSequence>
  <Custom Action="SetInst1PProductductName" Before="ValidateInst1PProductductID" />
  <Custom Action="SetInstanceDirectory" Before="CostFinalize"><![CDATA[Inst1PProductductWEB = ""]]></Custom>
  <RemoveExistingInst1PProductducts Before="InstallInitialize" />
</InstallExecuteSequence>

<InstallUISequence>
  <Custom Action="SetInstance_Inst1" Before="SetTransforms"><![CDATA[ACTION = "INSTALL" AND INSTANCEID = "Default" AND Inst1INSTALLEDInst1PProductductCODE = ""]]></Custom>
  <Custom Action="SetInstance_Inst1Stage" After="SetInstance_Inst1"><![CDATA[ACTION = "INSTALL" AND INSTANCEID = "Default" AND Inst1STAGEINSTALLEDInst1PProductductCODE = ""]]></Custom>
  <Custom Action="SetInstance_Inst3" After="SetInstance_Inst1Stage"><![CDATA[ACTION = "INSTALL" AND INSTANCEID = "Default" AND Inst3INSTALLEDInst1PProductductCODE = ""]]></Custom>
  <Custom Action="SetInstance_Inst4" After="SetInstance_Inst3"><![CDATA[ACTION = "INSTALL" AND INSTANCEID = "Default" AND Inst4INSTALLEDInst1PProductductCODE = ""]]></Custom>
  <Custom Action="SetInstance_Other" After="SetInstance_Inst4"><![CDATA[ACTION = "INSTALL" AND INSTANCEID = "Default" AND OTHERINSTALLEDInst1PProductductCODE = ""]]></Custom>
  <Custom Action="SetInstance_Other2" After="SetInstance_Other"><![CDATA[ACTION = "INSTALL" AND INSTANCEID = "Default" AND OTHER2INSTALLEDInst1PProductductCODE = ""]]></Custom>
  <Custom Action="SetInstance_Other3" After="SetInstance_Other2"><![CDATA[ACTION = "INSTALL" AND INSTANCEID = "Default" AND OTHER3INSTALLEDInst1PProductductCODE = ""]]></Custom>

  <Custom Action="SetTransforms" Before="ExecuteAction"><![CDATA[ACTION = "INSTALL"]]></Custom>
  <Custom Action="SetNewInstance" Before="ExecuteAction"><![CDATA[ACTION = "INSTALL"]]></Custom>

</InstallUISequence>

许可证接受=“1”
1.
1.

我的理解是,在启动MSI包之前,必须设置
转换
MSINEWINSTANCE
值。MSI SDK在主题中显示它:。您可以像现在这样通过自定义操作设置
MSINEWINSTANCE
,但我非常确定,在Windows Installer打开MSI包之前必须设置
TRANSFORMS
属性,因为在打开MSI包时应用转换


基本上,您需要某种引导程序或有文档记录的命令行过程来正确设置这些。由于这些类型的问题,Windows Installer中的多个实例包很有挑战性。

我会首先尝试从命令行进行测试/故障排除,以消除UI的复杂性

安装实例时,应始终传入转换,并始终从命令行指定MSINEWINSTANCE=1

msiexec /i App.msi TRANSFORMS=:Inst1 MSINEWINSTANCE=1
msiexec /i App.msi TRANSFORMS=:Inst1Stage MSINEWINSTANCE=1
msiexec /x App.msi TRANSFORMS=:Inst1
msiexec /x App.msi TRANSFORMS=:Inst1Stage

我在想,如果您可以通过命令行验证事情是否正确,那么您可以确认您的问题特定于与设置实例相关的GUI和CAs。

我现在有一个奇怪的问题。我可以安装应用程序的一个实例,但在尝试安装另一个实例时失败。如果在安装实例后双击msi,则会收到错误消息2755。详细日志显示guid存在。当我尝试使用msiexec x{GUID}卸载它时,它似乎工作正常?但是当我再次运行它时,我得到了相同的错误。如果我尝试安装另一个实例,比如msiexec/I App.msi/MSINEWINSTANCE=1 TRANSFORMS:=ProductStage,我会收到一条错误消息,表示尝试转换多个GUID失败…根据我的详细日志:Action 10:07:07:SetNewInstance。操作开始10:07:07:SetNewInstance。MSI(c)(84:58)[10:07:07:401]:属性更改:添加MSINEWINSTANCE属性。其值为“1”。操作结束于10:07:07:SetNewInstance。返回值1。MSI(c)(84:58)[10:07:07:401]:执行操作:SetInstance_01操作10:07:07:SetInstance_01。动作开始10:07:07:SetInstance_01。属性更改:修改INSTANCEID属性。其当前值为“Def”。它的新值:“Product01”。动作结束于10:07:07:SetInstance_01。返回值1。因此它正确地应用了转换,这是通过UI btw实现的。但我随后在执行阶段遇到了此错误:调试:错误2755:服务器在尝试安装包ProductWebInstaller.msi时返回意外错误1624。安装程序在安装此程序包时遇到意外错误。这可能表明此软件包存在问题。错误代码是2755。这些论点是:1624,ProductWebInstaller.msi,msi(c)(84:58)[10:07:10:445]:Product:Product8.3I有一些想法。1624年的错误似乎与转换有关,这可以追溯到Rob在开始时的评论。我假设转换是内部的。我在上面的命令行调用中添加了“:”以表明这一事实。我仍然很好奇从测试中删除UI和CA时的行为。在命令行中正确运行transform和MSINEWINSTANCE=1的安装程序可能会确认Rob所说的话,或者意味着CA排序已关闭。祝你好运最后,它可能只是在复制到这里之前编辑源代码,但是/Instance/@ProductName和/Instance/@ProductCode的属性似乎不正确。你可能想再检查一遍。我会试试,然后再告诉你我的发现。关于属性。对我来说,这只是糟糕的编辑。自从我发布这篇文章以来,实际的代码已经完全改变了(除去UI和CA)。
msiexec /i App.msi TRANSFORMS=:Inst1 MSINEWINSTANCE=1
msiexec /i App.msi TRANSFORMS=:Inst1Stage MSINEWINSTANCE=1
msiexec /x App.msi TRANSFORMS=:Inst1
msiexec /x App.msi TRANSFORMS=:Inst1Stage