Hi Team, I need to uninstall python through BigFix. so, I am using below shared command, but it got failed. Does anyone could help me if anything wrong in this command? or please confirm if is there any other method to remove python?
override wait
hidden=true
runas=currentuser
wait cmd /K “{(pathname of it) of file whose (name of it as string = “python-3.11.8-amd64.exe”) of folder “AppData\Local\Package Cache{02717f5c-724f-48a7-86c0-ee11d4de681c}” of folders of folders “c:\users”}” /uninstall /quiet
You can try following:
//Task Relevance:
exists ((pathnames of it) of files whose (name of it as string as lowercase contains "python-" as lowercase AND name of it as string as lowercase contains ".exe" as lowercase) of folders of folder "AppData\Local\Package Cache" of folders of folders "c:\users")
//Action script:
delete __createfile
delete "C:\windows\temp\UninstallPython.bat"
createfile until EOF
{concatenation "%0d%0a" of ("%22" & it & "%22 /uninstall /quiet") of ((pathnames of it) of files whose (name of it as string as lowercase contains "python-" as lowercase AND name of it as string as lowercase contains ".exe" as lowercase) of folders of folder "AppData\Local\Package Cache" of folders of folders "c:\users")}
EOF
move __createfile "C:\windows\temp\UninstallPython.bat"
override wait
hidden=true
runas=currentuser
wait cmd.exe /C "C:\windows\temp\UninstallPython.bat"
Note: I have tested this within my test lab, and it works fine with my user account. However, it may behave differently in your infrastructure if these uninstallers require administrative privileges. If you encounter issues, you might need to consider using an AD GPO-based approach to ensure proper execution.