dim fso,fs1,subss
Set ws = WScript.CreateObject ("WScript.Shell")
set fso = CreateObject("Scripting.FileSystemObject")
if fso.FolderExists("C:\Documents and Settings\All Users\Application Data\Symantec\Cached Installs") Then
set fs1 = fso.GetFolder("C:\Documents and Settings\All Users\Application Data\Symantec\Cached Installs")
set subss = fs1.SubFolders
End if
If fso.FileExists("c:\program files\symantec\symevent.sys") Then
for each objSubFolder In subss
ws.Run "msiexec.exe /x " & objSubfolder.Name & " /q /norestart",1,True
Next
Else
if fso.FileExists("c:\program files\symantec\liveupdate\lsetup.exe") Then
ws.Run "c:\progra~1\symantec\Liveupdate\lsetup.exe /U /q",q,True
else
End if
End if
Set net0 = wscript.CreateObject ("WScript.Network")
struser = "EMLibUser1" 'Update Server username
strPass = "mysecurepassword" 'Update Server password for given username
driveletter = "r:" 'Drive letter to use when mapping to server for sophos install
if fso.DriveExists(driveletter) then
net0.RemoveNetworkDrive driveletter
End if
net0.MapNetworkDrive driveletter,"\\sophos.server.com\Interchk",false,struser,strPass
ws.Run driveletter & "\esxp\setup.exe -user " & struser & " -pwd " & strPass & " -mng yes -updp \\sophos.server.com\Interchk\ESXP",1,True
net0.RemoveNetworkDrive driveletter
set net0 = Nothing
Set ws = Nothing
Set fso = Nothing
Set fs1 = Nothing
Set ws = WScript.CreateObject ("WScript.Shell")
set fso = CreateObject("Scripting.FileSystemObject")
if fso.FolderExists("C:\Documents and Settings\All Users\Application Data\Symantec\Cached Installs") Then
set fs1 = fso.GetFolder("C:\Documents and Settings\All Users\Application Data\Symantec\Cached Installs")
set subss = fs1.SubFolders
End if
If fso.FileExists("c:\program files\symantec\symevent.sys") Then
for each objSubFolder In subss
ws.Run "msiexec.exe /x " & objSubfolder.Name & " /q /norestart",1,True
Next
Else
if fso.FileExists("c:\program files\symantec\liveupdate\lsetup.exe") Then
ws.Run "c:\progra~1\symantec\Liveupdate\lsetup.exe /U /q",q,True
else
End if
End if
Set net0 = wscript.CreateObject ("WScript.Network")
struser = "EMLibUser1" 'Update Server username
strPass = "mysecurepassword" 'Update Server password for given username
driveletter = "r:" 'Drive letter to use when mapping to server for sophos install
if fso.DriveExists(driveletter) then
net0.RemoveNetworkDrive driveletter
End if
net0.MapNetworkDrive driveletter,"\\sophos.server.com\Interchk",false,struser,strPass
ws.Run driveletter & "\esxp\setup.exe -user " & struser & " -pwd " & strPass & " -mng yes -updp \\sophos.server.com\Interchk\ESXP",1,True
net0.RemoveNetworkDrive driveletter
set net0 = Nothing
Set ws = Nothing
Set fso = Nothing
Set fs1 = Nothing