Thanks
Sal
Hi
I would have used the "net send" command to send a message to the remote
computer/user:
Set oShell = CreateObject("WScript.Shell")
sNode = "136.164.48.162" ' IP address or computer name
' Chr(20) vill create a new line in the messenger service dialog box
sMsg = "An important security update is now installed on your computer." _
& Chr(20) & Chr(20) _
& "Please reboot the computer immediately to let it take effect!"
oShell.Run "net.exe send " & sNode & " """ & sMsg & """", 0, False
--
torgeir
Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of the 1328 page
Scripting Guide: http://www.microsoft.com/technet/scriptcenter
Is there any way for me to use the IPFILE.txt instead of manually having to
enter the IP address for each IP ?
Thanks
Sal
"Torgeir Bakken (MVP)" <Torgeir.B...@hydro.com> wrote in message
news:3F65F696...@hydro.com...
> Thanks for the reply
>
> Is there any way for me to use the IPFILE.txt instead of manually having to
> enter the IP address for each IP ?
Hi
Below is the code for net send implemented into the (sub)code found at
http://support.microsoft.com/?kbid=827227 so that a message is sent at once when
a successful installation is done.
My inserted code is between
' XXXXXXXXXXX code insert start XXXXXXXXXXX
and
' XXXXXXXXXXX code insert stop XXXXXXXXXXX
Here you go:
' rest of original script above here
else
' Get a reference to the file that was copied.
set odestFile = osvcLocal.get("cim_datafile=""z:\\Patchinst.exe""")
' Wait for the installation to complete.
' Lay and wait--up to two minutes for the installation to complete.
for waitTime = 0 to 120
wscript.Sleep 1000 ' Sleep one second.
' Delete temporary file as soon as possible after it is freed.
if (odestFile.Delete() = 0) then
exit for
end if
next ' Otherwise, loop again and keep waiting...
' XXXXXXXXXXX code insert start XXXXXXXXXXX
' send message to user/computer
Set oShell = CreateObject("WScript.Shell")
' Chr(20) vill create a new line in the messenger service dialog box
sMsg="An important security update is now installed on your computer." _
& Chr(20) & Chr(20) _
& "Please reboot the computer immediately to let it take effect!"
oShell.Run "net.exe send " & ip & " """ & sMsg & """", 0, False
' XXXXXXXXXXX code insert stop XXXXXXXXXXX
wscript.echo "Installation successful."
end if 'Create process succeeded.
' rest of original script below here
Sal
"Torgeir Bakken (MVP)" <Torgeir.B...@hydro.com> wrote in message
news:3F66034D...@hydro.com...