Anyone that has used Trend WFBS would know that it takes up a lot of space for nothing. Trend have a tool to fix this now, so i made it into a script.

Get the files from the below URL, make into an auto install exe, put on your webserver.

http://esupport.trendmicro.com/pages/Worry-Free-Business-Security-Standard-Advanced-Disk-Cleaner.aspx#command_line

It saves 1-3gb on the clients i have already run it on.

sTarget = “C:temp”

Set objFSO = CreateObject(“Scripting.FileSystemObject”)
If Not objFSO.FolderExists(sTarget) Then
objFSO.CreateFolder(“c:temp”)
End If

Wscript.Echo “Starting”

strFileURL = “http://YOUR URL/Trend_clean.exe
strHDLocation = “c:temptrend_clean.exe”

If objFSO.Fileexists(“c:scriptsTrendBuildNumber_16.0.0.2191“) Then

Set WshShell = WScript.CreateObject(“WScript.Shell”)
‘ update
Wscript.Echo “Running Trend Cleaner”
Return = WshShell.Run(“C:scriptsTrendTMDiskCleaner.exe /hide /log “, 0, true)

Wscript.Echo “Complete”

Else Set objXMLHTTP = CreateObject(“MSXML2.XMLHTTP”)

objXMLHTTP.open “GET”, strFileURL, false
objXMLHTTP.send()

If objXMLHTTP.Status = 200 Then

Wscript.Echo “Downloading the latest version of Trend Clean” & VbCrLf & VbCrLf
Set objADOStream = CreateObject(“ADODB.Stream”)
objADOStream.Open
objADOStream.Type = 1 ‘adTypeBinary

objADOStream.Write objXMLHTTP.ResponseBody
objADOStream.Position = 0

Set objFSO = Createobject(“Scripting.FileSystemObject”)
If objFSO.Fileexists(strHDLocation) Then objFSO.DeleteFile strHDLocation
Set objFSO = Nothing

objADOStream.SaveToFile strHDLocation
objADOStream.Close
Wscript.Echo “Download complete” & VbCrLf & VbCrLf
Set objADOStream = Nothing
End if

‘ Install update from c:temptrend_clean.exe
Set WshShell = WScript.CreateObject(“WScript.Shell”)
Return = WshShell.Run(“c:temptrend_clean.exe “, 0, true)

‘ Run
Wscript.Echo “Running Trend Cleaner”
Return = WshShell.Run(“C:scriptsTrendTMDiskCleaner.exe /hide /log “, 0, true)

Wscript.Echo “Complete”

End if

« »