私のアプリケーションのアップグレードを許可しようとしています。ユーザーが1.0.0をインストールした場合、次にバージョンをリリースするときに1.1.0を与えることができ、それをインストールすることができます。 Overwriting | removing | replacing the first version
バージョンをコントロールパネルでアンインストールするか、プログラムを変更するだけでインストールしてください。アプリケーションのアップグレードを許可する
私の問題は、次のとおりです。私は同じ製品ID *を(代わりに$(var.ProductId)」を使用して)設定されていない場合
私はこの製品の別のバージョンがすでにインストールされている
を取得します。このバージョンは続行できません のインストール...
が、私はそれが*、それは新しいバージョンをインストールするために等しいと私は2つのバージョンがインストールされている設定した場合。
私はこれをテストするために単純な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つのバージョンの結果。
アップデート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>
:コントロールパネルの2つのバージョンの結果。
動作しませんでした。それは私が前に見たことがないインストールを完了するためにPCを再起動するように私に尋ねた。しかし、私はまだちょうど最新のものではなく、マシンにインストールされた2つのバージョンで終わった。 – DaImTo