Hi
Please use below procedures to run sophos update and background scan .
Run sophos update
import os;
file='sophosupdate.vbs';
input="""dim objALC : set objALC = CreateObject("ActiveLinkClient.ClientUpdate.1")
objALC.UpdateNow 1,1
"""
fobj= open(file, "w");
fobj.write(input);
fobj.close();
out=os.popen('cscript.exe '+file).read();
print(out);
os.remove("sophosupdate.vbs")
Run sophos background scan
import _winreg;
import os;
key = getattr(_winreg,"HKEY_LOCAL_MACHINE")
subkey = _winreg.OpenKey(key, "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" )
(value, type) = _winreg.QueryValueEx(subkey,"PROCESSOR_ARCHITECTURE")
if value== 'AMD64' :
out=os.popen(r'"C:\Program Files (x86)\Sophos\Sophos Anti-Virus\BackgroundScanClient.exe" {F86EBCD5-687E-40B1-800D-021062361F6C}').read();
print(out)
else:
out=os.popen(r'"C:\Program Files\Sophos\Sophos Anti-Virus\BackgroundScanClient.exe" {F86EBCD5-687E-40B1-800D-021062361F6C}').read();
print(out)
run_sophos_update_scan.txt (948 Bytes)