[issue6258] distributions built with bdist_msi on 64-bit Windows fail to install correctly

Jason R. Coombs report at bugs.python.org
Wed Jun 10 23:21:35 CEST 2009

Jason R. Coombs <jaraco at jaraco.com> added the comment:

Based on the MSDN article and what I read in a blog entry
I thought that the enclosed patch might work around the issue... and
while it does set the template property to x64, the undesirable behavior

Index: Lib/msilib/__init__.py
--- Lib/msilib/__init__.py      (revision 73295)
+++ Lib/msilib/__init__.py      (working copy)
@@ -3,8 +3,11 @@
 # Licensed to PSF under a Contributor Agreement.
 from _msi import *
 import os, string, re
+import sys

+AMD64 = 'AMD64' in sys.version
+Win64 = Intel64 or AMD64

 # Partially taken from Wine
 datasizemask=      0x00ff
@@ -145,8 +148,10 @@
     si.SetProperty(PID_TITLE, "Installation Database")
     si.SetProperty(PID_SUBJECT, ProductName)
     si.SetProperty(PID_AUTHOR, Manufacturer)
-    if Win64:
+    if Intel64:
         si.SetProperty(PID_TEMPLATE, "Intel64;1033")
+    elif AMD64:
+        si.SetProperty(PID_TEMPLATE, "x64;1033")
         si.SetProperty(PID_TEMPLATE, "Intel;1033")
     si.SetProperty(PID_REVNUMBER, gen_uuid())

components: +Windows

Python tracker <report at bugs.python.org>

More information about the Python-bugs-list mailing list