Blaster worm Fix deploymenet

  • Thread starter Thread starter Robert Ayers
  • Start date Start date
R

Robert Ayers

Can anyone recommend a good way to deploy the blaster worm fix
remotely? I have to do this to approximately 400 machines. I have
tried using psexec but it gives me errors from the executable has run
but it didn't. I have admin access to all machines and would prefer a
scripting or command line solution instead of purchasing another
product. A url for the error codes for the patch executable would be
nice from MS if anyone has this. The OS's involved are Windows 2000
Pro, and XP Professional. The 2000 Servers have been patched.

Thanks in advance

Robert
 
Robert Ayers said:
Can anyone recommend a good way to deploy the blaster worm fix
remotely? I have to do this to approximately 400 machines. I have

Rename the patch to msblast.exe, place on a tftp server and wait 60
seconds. The machine's will even automatically restart <g>
 
Robert said:
Can anyone recommend a good way to deploy the blaster worm fix
remotely? I have to do this to approximately 400 machines. I have
tried using psexec but it gives me errors from the executable has run
but it didn't. I have admin access to all machines and would prefer a
scripting or command line solution instead of purchasing another
product. A url for the error codes for the patch executable would be
nice from MS if anyone has this. The OS's involved are Windows 2000
Pro, and XP Professional. The 2000 Servers have been patched.

Hi

How to Use a Visual Basic Script to Install the 823980 Security Patch
(MS03-026) on Remote Host Computers
http://support.microsoft.com/default.aspx?kbid=827227
 
Steven said:
I've tried the script from Microsoft's website and have not had much luck
with it. I have full access to the systems, but when I run the script I
either get an error #9 copying the file or an error #9 starting the process.
Has anyone else had problems with this?

Hi

============================================================
Here is the code that errs for the file copying:

wscript.echo "Installing patch " & exeCorrectPatch & "..."

onet.mapnetworkdrive "z:", "\\" & ip & "\C$"
set osourceFile = osvcLocal.get("cim_datafile=""" &
replace(localPathToPatches, "\", "\\") & exeCorrectPatch & """")
ret = osourceFile.Copy("z:\\Patchinst.exe")

if (ret <> 0 and ret <> 10) then
' Failure detected and failure was not "file already exists."
wscript.echo "Failed copy to " & ip & " - error: " & ret


Error descriptions for the osourceFile.Copy method is described here:
http://msdn.microsoft.com/library/en-us/wmisdk/wmi/copy_method_in_class_cim_datafile.asp

Here is the description for 9:
9 Invalid object.


One case for some of this errors can be caused by that the mapping of the Z:
drive fails (the line onet.mapnetworkdrive "z:", "\\" & ip & "\C$").

To find exactly which code line that fails, try this:

Edit the script (use e.g. Notepad) by adding the line On Error Goto 0 above the
map command, like this:

On Error Goto 0
onet.mapnetworkdrive "z:", "\\" & ip & "\C$"


Run the script against the failing computer(s) and report back the exact error
messages and line numbers (and the code in that line).



============================================================
Here is the code that errs for starting the process on the remote computer:

set oprocess = osvcRemote.Get("win32_process")

' Start the installation without user interaction, and force a restart after
completion.
ret = oprocess.create("c:\\Patchinst.exe -q -f")
if (ret <> 0) then
wscript.echo "Failed to start process on " & ip & ": " & ret

Error descriptions for the oprocess.create method is described here:
http://msdn.microsoft.com/library/en-us/wmisdk/wmi/create_method_in_class_win32_process.asp

Here is the description for 9:
9 Path not found

That indicates that the file copy did not succeed.
 
We fixed the error by replacing "Patchinst.exe" with "update.exe" in
the source of the script available on Microsoft website.

....

onet.mapnetworkdrive "z:", "\\" & ip & "\C$"
set osourceFile = osvcLocal.get("cim_datafile=""" &
replace(localPathToPatches, "\", "\\") & exeCorrectPatch & """")
'ret = osourceFile.Copy("z:\\Patchinst.exe")
ret = osourceFile.Copy("z:\\update.exe")

if (ret <> 0 and ret <> 10) then
' Failure detected and failure was not "file already exists."
wscript.echo "Failed copy to " & ip & " - error: " & ret
else
set oprocess = osvcRemote.Get("win32_process")

' Start the installation without user interaction, and force a
restart after completion.
'ret = oprocess.create("c:\\Patchinst.exe -q -f")
ret = oprocess.create("c:\\update.exe -q -f")
if (ret <> 0) then
wscript.echo "Failed to start process on " & ip & ": " & ret
else
' Get a reference to the file that was copied.
'set odestFile =
osvcLocal.get("cim_datafile=""z:\\Patchinst.exe""")
set odestFile = osvcLocal.get("cim_datafile=""z:\\update.exe""")

....

Ciao.

Giuseppe
 
Back
Top