需要一点帮助...
错误: Windows Installer服务无法安装升级修补程序,因为可能缺少要升级的程序,或者升级修补程序可能会更新该程序的其他版本。确认您的计算机上存在要升级的程序,并且您具有正确的升级修补程序。
我做了以下事情......
...场景 安装MSI v1.0 - >安装MSP 1.1 =正常工作。
安装MSI v1.0 - >安装MSP 1.1 - >安装MSP 1.2 = FAIL,Windows无法找到应用程序。
安装MSI v1.1 - >安装MSP 1.2 =正常工作。
对我而言,这意味着当第一个补丁(1.1)发生故障时可能没有更新,或者在创建补丁1.2时我需要考虑1.0和1.1。我尝试过各种各样的选择,从使用到... ...
有什么想法吗?
更新/补丁码......
Product.wxs
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*"
Name="WiX Patch Example Product"
Language="1033"
Version="1.0.0"
Manufacturer="Dynamo Corporation"
UpgradeCode="48C49ACE-90CF-4161-9C6E-9162115A54DD">
<Package Description="Installs a file that will be patched."
Comments="This Product does not install any executables"
InstallerVersion="200"
Compressed="yes" />
<Media Id="1" Cabinet="product.cab" EmbedCab="yes" />
<FeatureRef Id="SampleProductFeature"/>
</Product>
<Fragment>
<Feature Id="SampleProductFeature" Title="Sample Product Feature" Level="1">
<ComponentRef Id="File_1.txt" />
<ComponentRef Id="File_2.txt" />
<ComponentRef Id="File_3.txt" />
</Feature>
</Fragment>
<Fragment>
<DirectoryRef Id="SampleProductFolder">
<Component Id="File_1.txt" Guid="{d738b2a9-0dbc-4381-9efd-5801723b1569}" DiskId="1">
<File Id="File_1.txt" Name="File 1.txt" Source=".\$(var.Version)\File 1.txt" />
</Component>
<Component Id="File_2.txt" Guid="{b9b267a3-5648-4e32-9ab1-f3032980f6c2}" DiskId="1">
<File Id="File_2.txt" Name="File 2.txt" Source=".\$(var.Version)\File 2.txt" />
</Component>
<Component Id="File_3.txt" Guid="{1df728ae-333d-47c5-9558-c0923f958a8d}" DiskId="1">
<File Id="File_3.txt" Name="File 3.txt" Source=".\$(var.Version)\File 3.txt" />
</Component>
</DirectoryRef>
</Fragment>
<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder" Name="PFiles">
<Directory Id="SampleProductFolder" Name="Patch Sample Directory">
</Directory>
</Directory>
</Directory>
</Fragment>
</Wix>
产品1.1.wxs
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="48C49ACE-90CF-4161-9C6E-9162115A54DD"
Name="WiX Patch Example Product"
Language="1033"
Version="1.1.0"
Manufacturer="Dynamo Corporation"
UpgradeCode="48C49ACE-90CF-4161-9C6E-9162115A54DD">
<Package Description="Installs a file that will be patched."
Comments="This Product does not install any executables"
InstallerVersion="200"
Compressed="yes" />
<Media Id="1" Cabinet="product.cab" EmbedCab="yes" />
<FeatureRef Id="SampleProductFeature"/>
</Product>
<Fragment>
<Feature Id="SampleProductFeature" Title="Sample Product Feature" Level="1">
<ComponentRef Id="File_1.txt" />
<ComponentRef Id="File_2.txt" />
<ComponentRef Id="File_3.txt" />
<ComponentRef Id="File_4.txt" />
</Feature>
</Fragment>
<Fragment>
<DirectoryRef Id="SampleProductFolder">
<Component Id="File_1.txt" Guid="{d738b2a9-0dbc-4381-9efd-5801723b1569}" DiskId="1">
<File Id="File_1.txt" Name="File 1.txt" Source=".\$(var.Version)\File 1.txt" />
</Component>
<Component Id="File_2.txt" Guid="{b9b267a3-5648-4e32-9ab1-f3032980f6c2}" DiskId="1">
<File Id="File_2.txt" Name="File 2.txt" Source=".\$(var.Version)\File 2.txt" />
</Component>
<Component Id="File_3.txt" Guid="{1df728ae-333d-47c5-9558-c0923f958a8d}" DiskId="1">
<File Id="File_3.txt" Name="File 3.txt" Source=".\$(var.Version)\File 3.txt" />
</Component>
<Component Id="File_4.txt" Guid="{f728f62d-91f4-4c78-b2fe-65a9f0f6043c}" DiskId="1">
<File Id="File_4.txt" Name="File 4.txt" Source=".\$(var.Version)\File 4.txt" />
</Component>
</DirectoryRef>
</Fragment>
<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder" Name="PFiles">
<Directory Id="SampleProductFolder" Name="Patch Sample Directory">
</Directory>
</Directory>
</Directory>
</Fragment>
</Wix>
产品1.2.wxs
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="48C49ACE-90CF-4161-9C6E-9162115A54DD"
Name="WiX Patch Example Product"
Language="1033"
Version="1.2.0"
Manufacturer="Dynamo Corporation"
UpgradeCode="48C49ACE-90CF-4161-9C6E-9162115A54DD">
<Package Description="Installs a file that will be patched."
Comments="This Product does not install any executables"
InstallerVersion="200"
Compressed="yes" />
<Media Id="1" Cabinet="product.cab" EmbedCab="yes" />
<FeatureRef Id="SampleProductFeature"/>
</Product>
<Fragment>
<Feature Id="SampleProductFeature" Title="Sample Product Feature" Level="1">
<ComponentRef Id="File_1.txt" />
<ComponentRef Id="File_2.txt" />
<ComponentRef Id="File_3.txt" />
<ComponentRef Id="File_4.txt" />
</Feature>
</Fragment>
<Fragment>
<DirectoryRef Id="SampleProductFolder">
<Component Id="File_1.txt" Guid="{d738b2a9-0dbc-4381-9efd-5801723b1569}" DiskId="1">
<File Id="File_1.txt" Name="File 1.txt" Source=".\$(var.Version)\File 1.txt" />
</Component>
<Component Id="File_2.txt" Guid="{b9b267a3-5648-4e32-9ab1-f3032980f6c2}" DiskId="1">
<File Id="File_2.txt" Name="File 2.txt" Source=".\$(var.Version)\File 2.txt" />
</Component>
<Component Id="File_3.txt" Guid="{1df728ae-333d-47c5-9558-c0923f958a8d}" DiskId="1">
<File Id="File_3.txt" Name="File 3.txt" Source=".\$(var.Version)\File 3.txt" />
</Component>
<Component Id="File_4.txt" Guid="{f728f62d-91f4-4c78-b2fe-65a9f0f6043c}" DiskId="1">
<File Id="File_4.txt" Name="File 4.txt" Source=".\$(var.Version)\File 4.txt" />
</Component>
</DirectoryRef>
</Fragment>
<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder" Name="PFiles">
<Directory Id="SampleProductFolder" Name="Patch Sample Directory">
</Directory>
</Directory>
</Directory>
</Fragment>
</Wix>
补丁1.1
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Patch
AllowRemoval="yes"
Manufacturer="Dynamo Corp"
MoreInfoURL="http://www.dynamocorp.com/"
DisplayName="Sample Patch"
Description="Small Update Patch"
Classification="Update"
OptimizedInstallMode="yes">
<Media Id="8000" Cabinet="RTM.cab" CompressionLevel="none">
<PatchBaseline Id="RTM">
</PatchBaseline>
</Media>
<PatchFamilyRef Id="SamplePatchFamily"/>
</Patch>
<Fragment>
<PatchFamily Id='SamplePatchFamily' Version='1.1.0' Supersede='no'>
</PatchFamily>
</Fragment>
</Wix>
补丁1.2
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Patch
AllowRemoval="yes"
Manufacturer="Dynamo Corp"
MoreInfoURL="http://www.dynamocorp.com/"
DisplayName="Sample Patch"
Description="Small Update Patch"
Classification="Update"
OptimizedInstallMode="yes">
<Media Id="8000" Cabinet="RTM.cab" CompressionLevel="none">
<PatchBaseline Id="RTM">
</PatchBaseline>
</Media>
<PatchFamilyRef Id="SamplePatchFamily"/>
</Patch>
<Fragment>
<PatchFamily Id='SamplePatchFamily' Version='1.2.0' Supersede='no'>
</PatchFamily>
</Fragment>
</Wix>
答案 0 :(得分:2)
使您的ProductId静态将有助于修补方案,每个下一个修补程序都可以。
但请记住运行.msi,例如版本1.3补丁(甚至版本1.0 msi)之后的版本1.5将失败:&#34;安装了另一个版本的产品......&#34;信息。因此,虽然您坚持使用相同的产品ID,但只提供补丁(.msp从.msi创建),当您希望提供新的.msi时,请确保更改产品ID。
我对这个答案肯定来得太晚了,但是我在这个问题上浪费了整整一天的时间,并决定把它放在一起,以便其他人不必这么做。
我想MSI + MSP更新的两条规则是:
永远不要使用具有不同产品ID的MSI制作补丁,他们将无法找到产品且无法运行
永远不要提供具有相同产品ID的不同MSI,它们将失败并且#34;已安装另一个版本&#34;并且不会运行
如果一个不同的MSI用相同的产品ID覆盖了之前的MSI,那会简单得多,但必须有一个很好的理由......
答案 1 :(得分:1)
您需要全面的静态产品ID。您可以使用Orca进入并从1.0 msi中找到产品ID。在1.1和1.2 product.wxs ProductId。
中使用该guid