[3/3] win32/vd_agent: Optionally disable installation of x86 MSI on x64 system

Submitted by Yuri Benditovich on Oct. 18, 2019, 1:35 p.m.

Details

Message ID 20191018133522.30080-4-yuri.benditovich@daynix.com
State New
Headers show
Series "Make WIX script to be useful in Windows build" ( rev: 1 ) in Spice

Not browsing as part of any series.

Commit Message

Yuri Benditovich Oct. 18, 2019, 1:35 p.m.
Currently the MSI built for x86 system can be easily installed
on x64 system. When the script is processed by WIX this can be
prevented by passing '-dNoWOW=yes' to the WIX-candle.

Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
---
 spice-vdagent.wxs.in | 5 +++++
 1 file changed, 5 insertions(+)

Patch hide | download patch | download mbox

diff --git a/spice-vdagent.wxs.in b/spice-vdagent.wxs.in
index 7778c27..c451f13 100644
--- a/spice-vdagent.wxs.in
+++ b/spice-vdagent.wxs.in
@@ -31,6 +31,11 @@ 
       <UpgradeVersion Minimum="0.0.0" Maximum="$(var.Version)" IncludeMinimum="yes" IncludeMaximum="no" Property="OLDERVERSIONBEINGUPGRADED"/>
     </Upgrade>
     <Condition Message="Product already installed.">NOT NEWERVERSIONDETECTED</Condition>
+    <?if $(var.Win64) = no AND $(var.NoWOW) = yes ?>
+      <Condition Message="Error: 32-bit version of $(env.PRODUCT) can not be installed on 64-bit Windows.">
+          <![CDATA[Not VersionNT64]]>
+      </Condition>
+    <?endif?>
     <InstallExecuteSequence>
       <RemoveExistingProducts After="InstallFinalize"/>
     </InstallExecuteSequence>