응용 프로그램 업그레이드를 허용하려고합니다. 사용자가 1.0.0을 설치하면 다음 번에 버전을 릴리스 할 때 1.1.0을 제공 할 수 있으며 설치할 수 있습니다. Overwriting | removing | replacing the first version
버전을 제어판 -> 제거 또는 프로그램으로 만 설치해야합니다.응용 프로그램 업그레이드 허용
내 문제는 다음과 같습니다
내가 설정하지 않은 경우제품 ID가 동일 * (사용 $ (var.ProductId)는 "대신에) 나는이 제품의 또 다른 버전이 이미 설치되어
를 얻을. 이 버전 계속할 수 없습니다 의 설치 ...
가 나는 그것이 * 다음 새 버전을 설치하기 위해 동일한 나는 두 가지 버전이 설치되어 설정합니다.
나는 이것을 테스트하기 위해 간단한 wix 응용 프로그램을 만들었습니다.
<?xml version="1.0" encoding="UTF-8"?>
<?define ProductVersion="!(bind.FileVersion.MyAssemblyDll)"?>
<?define UpgradeCode="f4d7f199-28f6-45d5-ad99-7c62938274be"?>
<?define ProductId="{6408D956-40DA-4AEE-883E-5425F1562004}"?>
<?define Version="1.2.0"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="$(var.ProductId)" Name="UpgradeTest" Language="1033" Version="$(var.Version)" Manufacturer="xxx" UpgradeCode="$(var.UpgradeCode)">
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
<!-- prevents down gradeing -->
<!-- one upgrade installes new version first then removes the old one. -->
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." Schedule="afterInstallExecute"/>
<MediaTemplate EmbedCab="yes"/>
<Feature Id="ProductFeature" Title="UpgradeTest" Level="1">
<ComponentGroupRef Id="ProductComponents" />
</Feature>
</Product>
<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLFOLDER" Name="UpgradeTest" />
</Directory>
</Directory>
</Fragment>
<Fragment>
<ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
<!-- TODO: Remove the comments around this Component element and the ComponentRef below in order to add resources to this installer. -->
<Component Id="ProductComponent">
<File Id="Product.wxs" Source="Product.wxs" KeyPath="yes" />
</Component>
</ComponentGroup>
</Fragment>
</Wix>
나는이 지금은 멀리 뒤로 어떤 도움을 크게 감상 할 수있다 2008 년에 모든 자습서를 소진 며칠 동안 작동하도록하기 위해 노력 해왔다.
업데이트 : 나쁜
<MajorUpgrade AllowDowngrades="no" DowngradeErrorMessage="A newer version of [ProductName] is already installed." AllowSameVersionUpgrades="no" />
: 제어판의 두 가지 버전으로 결과.
업데이트 2 : 나쁜
<Upgrade Id ="$(var.ProductUpgradeCode)">
<UpgradeVersion Minimum="$(var.ProductFullVersion)" OnlyDetect="yes" Property="NEWERVERSIONDETECTED"/>
<UpgradeVersion Maximum="$(var.ProductFullVersion)" IncludeMaximum="no" Property="OLDERVERSIONBEINGUPGRADED"/>
</Upgrade>
<InstallExecuteSequence>
<RemoveExistingProducts After="InstallValidate"/>
</InstallExecuteSequence>
<Condition Message="A newer version of [ProductName] is already installed. If you are sure you want to downgrade, remove the existing installation via Programs and Features.">Not NEWERVERSIONDETECTED</Condition>
: 제어판의 두 가지 버전으로 결과.
작동하지 않았습니다. 그것은 내가 전에 보지 못했던 설치를 끝내기 위해 PC를 다시 부팅하라고 요구했습니다. 그러나 나는 여전히 최신 버전이 아니라 기계에 설치된 두 가지 버전으로 끝났습니다. – DaImTo