summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Fleytman <dfleytma@redhat.com>2015-06-18 19:51:25 +0300
committerDmitry Fleytman <dfleytma@redhat.com>2015-06-18 19:52:14 +0300
commit458ad0f9a6a0a4993fb5d7cc404315c01d5f66b0 (patch)
treecba39c46463e847d492495e97ae270ceb0a3c221
parentcf281029a3b140905896a15d34394fe70ceb1f66 (diff)
Installer: Fix MSI reinstallation and downgradev1.00-6
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
-rw-r--r--Tools/Installer/UsbDkInstaller.wxs14
-rw-r--r--Tools/Installer/buildmsi.bat4
2 files changed, 14 insertions, 4 deletions
diff --git a/Tools/Installer/UsbDkInstaller.wxs b/Tools/Installer/UsbDkInstaller.wxs
index eed94d5..7368e69 100644
--- a/Tools/Installer/UsbDkInstaller.wxs
+++ b/Tools/Installer/UsbDkInstaller.wxs
@@ -43,6 +43,11 @@
Minimum="0.0.0.0" Maximum="$(var.UsbDkVersion)"
Property="PREVIOUSVERSIONSINSTALLED"
IncludeMinimum="yes" IncludeMaximum="no" />
+
+ <UpgradeVersion
+ Minimum="$(var.UsbDkVersion)" Maximum="99.99.99.99"
+ Property="NEWERVERSIONINSTALLED"
+ IncludeMinimum="no" IncludeMaximum="yes" />
</Upgrade>
<Directory Id="TARGETDIR" Name="SourceDir">
@@ -105,10 +110,15 @@
Return="ignore">
</CustomAction>
+ <CustomAction Id="PreventDowngrading"
+ Error="Error: Newer version of UsbDk already installed.">
+ </CustomAction>
+
<InstallExecuteSequence>
- <RemoveExistingProducts Before="InstallInitialize" />
+ <RemoveExistingProducts After="InstallInitialize">PREVIOUSVERSIONSINSTALLED&lt;&gt;""</RemoveExistingProducts>
<Custom Action="InstallDriver" After="InstallFiles">NOT Installed</Custom>
- <Custom Action="UninstallDriver" Before="RemoveFiles">Installed</Custom>
+ <Custom Action="UninstallDriver" Before="RemoveFiles">REMOVE</Custom>
+ <Custom Action="PreventDowngrading" After="FindRelatedProducts">NEWERVERSIONINSTALLED&lt;&gt;"" AND NOT Installed</Custom>
</InstallExecuteSequence>
<Feature Id="ProductFeature" Title="UsbDk Runtime Libraries" Level="1">
diff --git a/Tools/Installer/buildmsi.bat b/Tools/Installer/buildmsi.bat
index 83e929d..6a589ee 100644
--- a/Tools/Installer/buildmsi.bat
+++ b/Tools/Installer/buildmsi.bat
@@ -1,7 +1,7 @@
SETLOCAL EnableExtensions EnableDelayedExpansion
-IF [%UsbDkVersion%] == [] SET UsbDkVersion=99.99.99
-IF [%UsbDkVersion%] == [".."] SET UsbDkVersion=99.99.99
+IF [%UsbDkVersion%] == [] SET UsbDkVersion=99.99.90
+IF [%UsbDkVersion%] == [".."] SET UsbDkVersion=99.99.90
pushd ..\..\Install_Debug\x86