(imported topic written by SystemAdmin)
So the goal here was to right a windows only analysis / fixlet to report back the status of the Trend Officescan client. All are targeted at a Dynamic Computer which contains all Windows systems. We have to take into account x86 and x64 and we would have three possibilities for Trend - No Client, Officescan 8 or Officescan 10. Is there a better, easier, faster way of accomplishing this?
Analysis:
if (not x64 of operating system) then (if exists file “C:\Program Files\Trend Micro\OfficeScan Client\PccNT.exe” then version of file (“C:\Program Files\Trend Micro\OfficeScan Client\PccNT.exe”) as string else “No Client”) else if (x64 of operating system) then (if exists file “C:\Program Files (x86)\Trend Micro\OfficeScan Client\PccNT.exe” then version of file (“C:\Program Files (x86)\Trend Micro\OfficeScan Client\PccNT.exe”) as string else “No Client”) else “N/A”
Fixlet Relevance:
(if not x64 of operating system then (if not exists file “C:\Program Files\Trend Micro\OfficeScan Client\PccNT.exe” then True else (if version of file (“C:\Program Files\Trend Micro\OfficeScan Client\PccNT.exe”) < " then True else False)) else (if not exists file “C:\Program Files (x86)\Trend Micro\OfficeScan Client\PccNT.exe” then True else (if version of file (“C:\Program Files (x86)\Trend Micro\OfficeScan Client\PccNT.exe”) < “10.0.0.1068” then True else False)))
Fixlet Action:
// enter your action script here
download http://serverxyz:52311/Uploads/f7877ca01ac97d6b084721fcee079d4e105ff960/OfficeScanClientmsi.tmp
continue if {(size of it = 62908796 AND sha1 of it = “f7877ca01ac97d6b084721fcee079d4e105ff960”) of file “OfficeScanClientmsi.tmp” of folder “__Download”}
//uninstall Trend 8 Client
if (exists key “HKEY_LOCAL_MACHINE\SOFTWARE\TrendMicro\PC-cillinNTCorp\CurrentVersion\Misc.l” whose (exists value “ProgramVer” of it AND value “ProgramVer” of it as string != “10”) of registry) then
regset "
http://HKEY_LOCAL_MACHINE\SOFTWARE\TrendMicro\PC-cillinNTCorp\CurrentVersion\Misc.
" “Allow Uninstall”=dword:00000001
waithidden “C:\Program Files\Trend Micro\OfficeScan Client\ntrmv.exe”
endif
//Install Trend 10 Client
extract OfficeScanClientmsi.tmp
wait “{pathname of system folder & “\msiexec.exe”}” /i “{(pathname of client folder of current site) & “__Download\OfficeScanClient.msi”}” /qn /norestart