The people at Python may know Python quite well, but when it comes to packaging their product, nearly 100% of their installers have been botched in some way…and the 3.6.150.0 is no different. I ran into multiple issues when trying to deploy this. See below.
#1 – When deployed in the System Account, the app doesn’t appear in Programs and Features.
#2 – When installed in the System Account, the GUID {37a4e38b-baf7-4500-97f1-0f7c51d9a395} is installed in the wrong location.
#3 – The uninstall brings up the wrong window (their reg keys are wrong).
#4 – Once I modified the uninstaller to remove the app, not all files were removed.
#5 – Once I modified the uninstaller to remove the app, not all reg keys were removed.
Advice to Python, hire an actual packager. The 2.7.13150 MSI was also busted. I ended up just performing a capture/snapshot of the MSI install. For those looking to deploy the MSI and can’t, hit me up. I’ll send you the EXE I created from the snapshot. See bottom for a screenshot of 2.7.13150.
The Fix
So, to fix this mess, first I did the install with the options I wanted (scripted of course):
* I add the GUID app to c:\ProgramData\Package Cache
* Point the reg keys to the new package cache path
* Create a simple removal tool.
The Script
“C:\Program Files (x86)\LANDesk\LDClient\sdmcache\apps\Python\Python.exe” /quiet InstallAllUsers=1 InstallLauncherAllUsers=1 Include_lib=1 Include_pip=1 Include_tcltk=1 PrependPath=1 Include_test=1 Include_tools=1 TargetDir=c:\Python_361500 REM COPY PACKAGE GUID TO PROGRAMDATA\PACKAGE CACHE REM {37a4e38b-baf7-4500-97f1-0f7c51d9a395} “C:\Program Files (x86)\LANDesk\LDClient\sdmcache\apps\Python\Cache.exe” REM POINT REGISTRY TO NEW PACKAGE CACHE LOCATION regedit /s “C:\Program Files (x86)\LANDesk\LDClient\sdmcache\apps\Python\3.6.150.0.reg” REM ADD REMOVE UTIL copy /y “C:\Program Files (x86)\LANDesk\LDClient\sdmcache\apps\Python\Remove.cmd” “c:\Python_361500\Remove.cmd”
Remove.cmd (simple uninstaller)
@echo off title Python Uninstaller cls Echo Uninstalling Python… “C:\ProgramData\Package Cache\{37a4e38b-baf7-4500-97f1-0f7c51d9a395}\python-3.6.0-amd64.exe” /uninstall /quiet reg delete HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{37a4e38b-baf7-4500-97f1-0f7c51d9a395} /f reg delete HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{37a4e38b-baf7-4500-97f1-0f7c51d9a395} /f reg delete HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{1944B5D6-0FFB-47C0-BFEC-5C7A2F013FA7} /f del /q “C:\ProgramData\Package Cache\{37a4e38b-baf7-4500-97f1-0f7c51d9a395}\python-3.6.0-amd64.exe” del /q “C:\ProgramData\Package Cache\{37a4e38b-baf7-4500-97f1-0f7c51d9a395}\state.rsm” del /q “C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Python 3.6\*.*” rd /q “C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Python 3.6” rd /q “C:\ProgramData\Package Cache\{37a4e38b-baf7-4500-97f1-0f7c51d9a395}” exit
Reg Keys
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{37a4e38b-baf7-4500-97f1-0f7c51d9a395}] “BundleCachePath”=”C:\\ProgramData\\Package Cache\\{37a4e38b-baf7-4500-97f1-0f7c51d9a395}\\python-3.6.0-amd64.exe” “BundleUpgradeCode”=hex(7):7b,00,30,00,30,00,31,00,39,00,35,00,36,00,41,00,38,\ 00,2d,00,38,00,46,00,39,00,46,00,2d,00,35,00,36,00,30,00,34,00,2d,00,41,00,\ 43,00,45,00,39,00,2d,00,37,00,38,00,38,00,46,00,39,00,42,00,31,00,35,00,44,\ 00,42,00,35,00,43,00,7d,00,00,00,00,00 “BundleAddonCode”=hex(7): “BundleDetectCode”=hex(7): “BundlePatchCode”=hex(7): “BundleVersion”=”3.6.150.0” “BundleProviderKey”=”CPython-3.6” “BundleTag”=”” “EngineVersion”=”3.10.3.3007” “DisplayIcon”=”C:\\ProgramData\\Package Cache\\{37a4e38b-baf7-4500-97f1-0f7c51d9a395}\\python-3.6.0-amd64.exe,0” “DisplayName”=”Python 3.6.0 (64-bit)” “DisplayVersion”=”3.6.150.0” “Publisher”=”Python Software Foundation” “URLInfoAbout”=”http://www.python.org/” “QuietUninstallString”=”\”C:\\ProgramData\\Package Cache\\{37a4e38b-baf7-4500-97f1-0f7c51d9a395}\\python-3.6.0-amd64.exe\” /uninstall /quiet” “UninstallString”=”C:\\Python_361500\\Remove.cmd” “EstimatedSize”=dword:00016b9c “Resume”=dword:00000003 “Installed”=dword:00000001
The problems (click image to zoom)
So, after fixing these reg keys, copying the app guid folder to the proper place, and creating a removal tool, I finally got everything working.
2.7.13150
This is a screenshot from my capture util for 2.7.13150 (click image to zoom)