这里需要一点帮助...
错误:Windows Installer 服务无法安装升级补丁,因为可能缺少要升级的程序,或者升级补丁可能更新了不同版本的程序。验证要升级的程序是否存在于您的计算机上,并且您有正确的升级补丁。
我做了以下...
- 创建了一个 MSI 版本 1.0(GUID 自动创建),ProductId="*"
- 针对 1.0.wixpdb、1.1 版(已设置更新代码)、ProductId="{GUID1}" 创建了一个补丁 (MSP),pyro 给出了有关更改产品代码的警告。
- 针对 1.1.wixpdb 版本 1.2 创建了另一个补丁 (MSP)(保留相同的更新代码)。ProductId="{GUID1}",无法安装。
场景...安装 MSI v1.0 -> 安装 MSP 1.1 = 工作正常。
安装 MSI v1.0 -> 安装 MSP 1.1 -> 安装 MSP 1.2 = 失败,windows 找不到应用程序。
安装 MSI v1.1 -> 安装 MSP 1.2 = 工作正常。
对我来说,这意味着当第一个补丁 (1.1) 出现问题时,可能没有更新,或者在创建补丁 1.2 时我需要考虑 1.0 和 1.1。我尝试了各种选择,从使用到...
有任何想法吗?
更新/补丁代码...
产品.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>