Fixlet for Installing or updating python not working

Hi All,

I am new to Bigfix relevance language. I have tried installing Pythong using .msi and .exe and for both I am not getting error and can see action ran successfully but when checking system not able to find python installed any where. Could someone please have a look at my action script and see where I need improvement.

Action script for Python.exe

prefetch python-3.7.3.exe sha1:8cc3e5d9627ddcceed3dd366743edda905807078 size:25424128 https://www.python.org/ftp/python/3.7.3/python-3.7.3.exe sha256:1856f8bd2dfb1bbd1c0c7acca60d274ad9fdfe19240e949a310665dbfff4d736

//Quit Python if it is running
if {exists running application “python.exe”}
waithidden taskkill /F /IM python.exe
endif

//Uninstall Older Versions

If {exists key “(DCD5B320-89D9-4C7C-9E8B-84496588744e)” whose ((value “Displayname” of it as string contains “Python” ) AND (it < “3.7.3”) of (value “DisplayVersion” of it as string as version) AND (value “UninstallString” of it as string as lowercase contains “uninstall”)) of key “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall” of registry}
waithidden {value “UninstallString” of key “(DCD5B320-89D9-4C7C-9E8B-84496588744e)” whose ((value “Displayname” of it as string contains “Python”) AND (it < “3.7.3”) of (value “DisplayVersion” of it as string as version) AND (value “UninstallString” of it as string as lowercase contains “uninstall”)) of key “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall” of registry} /S
endif

//Install Python

wait “__Download\python-3.7.3.exe” /quiet

Action script for Python.msi

prefetch python-3.4.4.msi sha1:46c89a6eebfb5f2e8f9b7edbe5409e314366a66a size:24932352 https://www.python.org/ftp/python/3.4.4/python-3.4.4.msi sha256:46c8f9f63cf02987e8bf23934b2f471e1868b24748c5bb551efcf4863b43ca6c

//Install Python

wait “{pathname of system folder & “\msiexec.exe”}” /i “{(pathname of client folder of current site) & “__Download\python-3.4.4.msi”}” /quiet

Thanks in advance for any feedback.

Generally I’d try installing it manually, through psexec, to see if there are any messages displayed. In this case though, I think you’re missing a directory separator. The ‘pathname of client folder of current site’ won’t come with a trailing backslash, so try

wait “{pathname of system folder & “\msiexec.exe”}” /i “{(pathname of client folder of current site) & “\__Download\python-3.4.4.msi”}” /quiet

@JasonWalker Using below action stucks in Pending download.

wait “{pathname of system folder & “\msiexec.exe”}” /i “{(pathname of client folder of current site) & “__Download\python-3.4.4.msi”}” /quiet

I tried modifying script and used below, and action completed successfully, but surprising Python is not installed.

wait msiexec /i “__Download\python-3.4.4.msi” /qn

Have you tried it in psexec ?

psexec -i -s c:\windows\syswow64\cmd.exe

emulates the same kind of environment in which the BigFix client runs - 32-bit shell, running as LocalSystem.
The most common issues would be that it needs a 64-bit shell, in which case you’d add

action uses wow64 redirection false

to the actionscript before running the ‘wait’ command. Otherwise, if there is some kind of prerequisite, you may get a message stating that when you run the installer via psexec.

My Python fixlet renames the download to “python.msi” in the ‘add prefetch item’ statement so I don’t have to update the rest of the script when I change versions. Here are the rest of my install commands (this for Python 2.7)

action uses wow64 redirection false
waithidden msiexec.exe /i "{pathname of file "python.msi" of download folder}" /qn ALLUSERS=1 ADDLOCAL=ALL REBOOT=ReallySuppress

Hi @Jason Walker,

Using psexec its executing the file but not installing silently.

psexec -i -s c:\Users\Administrator\Downloads\python-3.7.3.exe.

Using your installation command for python I am again getting action completed but python is not gettinginstalled.

//Install Python

action uses wow64 redirection false
waithidden msiexec.exe /i “{pathname of file “python-3.4.4.msi” of download folder}” /qn ALLUSERS=1 ADDLOCAL=ALL REBOOT=ReallySupress

Look at the screen shot actions are getting completed. Dont know where is the fault.

When it was not silent, what did it say?

Try using my command line via psexec and see what it says.

I have had success with the .exe installer for Python
python-3.7.2-amd64.exe /quiet InstallAllUsers=1 PrependPath=1 Include_test=0

1 Like

@Pete_F Thanks finally its working.

@JasonWalker, Its working for msi as well using your action script. Thanks for help.