WiX多实例安装错误(错误码为2755).论据是:1639)



我一直在为我的安装创建多个实例,这是我到目前为止的代码。注意:明显的数据已被删除。我得到了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="SOFTWAREInst1PProductductInst1PProductductWeb(Inst1)" Type='string' Value="[SHORTCUT]" KeyPath='yes'/>
          <RegistryValue Id="VirtualDir" Name='VirtualDir' Productot='HKLM' Key='SOFTWAREInst1PProductductInst1PProductductWeb(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>

我的理解是必须在启动MSI包之前设置TRANSFORMSMSINEWINSTANCE值。MSI SDK在主题:使用实例转换安装多个实例中展示了它。可能您可以通过自定义操作设置MSINEWINSTANCE,但我很确定TRANSFORMS属性必须在Windows安装程序打开MSI包之前设置,因为转换在MSI包打开时应用。

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

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

在安装实例时,您应该始终在命令行中传递转换并始终指定mmsinewinstance =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和与设置实例相关的ca。

相关内容

  • 没有找到相关文章

最新更新