diff options
author | Christian Heimes <christian@cheimes.de> | 2007-12-04 15:52:14 (GMT) |
---|---|---|
committer | Christian Heimes <christian@cheimes.de> | 2007-12-04 15:52:14 (GMT) |
commit | 19b1aaa45d4d343b0710cef3ffdd24ef3b9230d2 (patch) | |
tree | 89371213b878b326d41df206ade7ae85de4a0572 | |
parent | 9acba0441e287e8d4517d0d8c4cbfbda3ffc7134 (diff) | |
download | cpython-19b1aaa45d4d343b0710cef3ffdd24ef3b9230d2.zip cpython-19b1aaa45d4d343b0710cef3ffdd24ef3b9230d2.tar.gz cpython-19b1aaa45d4d343b0710cef3ffdd24ef3b9230d2.tar.bz2 |
Added VS 2005 and VS 2008 to the search path for cabarc.exe
-rw-r--r-- | Tools/msi/msilib.py | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/Tools/msi/msilib.py b/Tools/msi/msilib.py index ca7e311..d65c997 100644 --- a/Tools/msi/msilib.py +++ b/Tools/msi/msilib.py @@ -376,14 +376,19 @@ class CAB: except OSError: pass for k, v in [(r"Software\Microsoft\VisualStudio\7.1\Setup\VS", "VS7CommonBinDir"), - (r"Software\Microsoft\Win32SDK\Directories", "Install Dir")]: + (r"Software\Microsoft\VisualStudio\8.0\Setup\VS", "VS7CommonBinDir"), + (r"Software\Microsoft\VisualStudio\9.0\Setup\VS", "VS7CommonBinDir"), + (r"Software\Microsoft\Win32SDK\Directories", "Install Dir"), + ]: try: key = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, k) - except WindowsError: + dir = _winreg.QueryValueEx(key, v)[0] + _winreg.CloseKey(key) + except (WindowsError, IndexError): + continue + cabarc = os.path.join(dir, r"Bin", "cabarc.exe") + if not os.path.exists(cabarc): continue - cabarc = os.path.join(_winreg.QueryValueEx(key, v)[0], r"Bin", "cabarc.exe") - _winreg.CloseKey(key) - if not os.path.exists(cabarc):continue break else: print "WARNING: cabarc.exe not found in registry" |