I am running an action script to uninstall Sophos and delete the folder’s in Program Files & Program Files (x86). Here is my action script, it’s failing with an exit code of 1605. Am I missing something simple here?
Completed //64-bit
Completed if {x64 of operating system}
Completed //SophosStopServices
Completed waithidden net stop "Sophos Anti-Virus"
Completed waithidden net stop "Sophos AutoUpdate Service"
Completed waithidden net stop "Sophos Agent"
Completed waithidden net stop "Sophos Anti-Virus status reporter"
Completed waithidden net stop "Sophos Message Router"
Completed waithidden net stop "Sophos Network Threat Protection"
Completed waithidden net stop "Sophos System Protection Service"
Completed waithidden net stop "Sophos Web Control Service"
Completed waithidden net stop "Sophos Web Intelligence Service"
Completed waithidden net stop "Sophos Web Intelligence Update"
Completed //Endpoint Defense
Completed dos echo "Endpoint Defense"
Completed if {exists folder “C:\Program Files\Sophos\Endpoint Defense”}
Completed waithidden “C:\Program Files\Sophos\Endpoint Defense\uninstall.exe” /quiet
Completed endif
Completed //System Protection
Completed dos echo "System Protection"
Completed if {exists folder “C:\Program Files (x86)\Sophos\Sophos System Protection”}
Completed waithidden MsiExec.exe /X{{1093B57D-A613-47F3-90CF-0FD5C5DCFFE6} /quiet /norestart
Completed endif
Completed //AutoUpdate
Completed dos echo "AutoUpdate"
Completed if {exists folder “C:\Program Files (x86)\Sophos\AutoUpdate”}
Completed waithidden MsiExec.exe /X{{AFBCA1B9-496C-4AE6-98AE-3EA1CFF65C54} /quiet /norestart
Completed endif
Completed //RemoteManagement
Completed dos echo "Remote Management"
Completed if {exists folder “C:\Program Files (x86)\Sophos\Remote Management System”}
Completed waithidden MsiExec.exe /X{{FED1005D-CBC8-45D5-A288-FFC7BB304121} /quiet /norestart
Completed endif
Completed //Anti Virus
Completed dos echo "Anti Virus"
Completed if {exists folder “C:\Program Files (x86)\Sophos\Sophos Anti-Virus”}
Completed waithidden MsiExec.exe /X{{65323B2D-83D4-470D-A209-D769DB30BBDB} /quiet /norestart
Completed endif
Completed //Network Threat
Completed dos echo "Network Threat"
Completed if {exists folder “C:\Program Files\Sophos\Sophos Network Threat Protection”}
Completed waithidden MsiExec.exe /X{{66967E5F-43E8-4402-87A4-04685EE5C2CB} /quiet /norestart
Completed endif
Completed //Delete Sophos Directory
Failed folder delete "C:\Program Files (x86)\Sophos"
folder delete “C:\Program Files\Sophos”
//dos rd “C:\Program Files\Sophos” /s /q
//dos rd “C:\Program Files (x86)\Sophos” /s /q
Edit: Just to clarify, the Completed portion of this is not in the action script, it’s the Execution detail showing where the script is failing.