Page 1 of 1 1
Topic Options
#123122 - 2004-07-16 03:34 PM Net send to AD Group
plazaai Offline
Fresh Scripter

Registered: 2003-07-25
Posts: 8
I have a script i found on this site to check for security patches. I changed it a little but want to be able to send a net send message to the either a group or a # of worksations if the patch is not found.

Any Ideas? Here's the script. (in the script I look for the reg entry and then call, if it's not found, an exe *KB823980.exe which is really an exe that will lock the keyboard and mouse if not found. the exe file name is irrelevant and does not really run that KB823980 patch)

? "Please Wait... Checking if Microsoft RPC Security Patch KB835732 is Installed"



$KBPATH="netlogon\hso"

Select


Case @ProductType='Windows NT Workstation'

$KBFile='Q823980i.EXE'

$KBRequired=KeyExist("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Q824146")

If $KBRequired

; Patch already installed

Else

Shell '%comspec% /c '+@LSERVER+'\'+$KBPath+'\'+$KBFile+' /u /q /z'

EndIf

Case @ProductType='Windows 2000 Professional'

$KBFile='Windows2000-KB823980.exe'

$KBRequired=KeyExist("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Updates\Windows 2000\SP5\kb835732\filelist")

If $KBRequired

? "Patch Already Installed"

Else

Shell @LSERVER+'\'+$KBPath+'\'+$KBFile

EndIf


Case @PRODUCTTYPE='Windows XP Professional'

$KBFile='WindowsXP-KB823980.exe'

If @CSD = 'Service Pack 1'

$KBRequired=KeyExist("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Updates\Windows XP\SP2\KB835732\Filelist")

If $KBRequired

? "Patch Already Installed"

Else


Shell @LSERVER+'\'+$KBPath+'\'+$KBFile

EndIf

EndIf

Case

$KBFile='WindowsXP-KB823980.exe'

$KBRequired=KeyExist("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Updates\Windows XP\SP2\KB835732\Filelist")

If $KBRequired

? "Patch Already Installed"

Else

Shell @LSERVER+'\'+$KBPath+'\'+$KBFile



EndIf

EndIf



Top
#123123 - 2004-07-16 03:59 PM Re: Net send to AD Group
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
This is not really a KiX question unless you are looking for an alternative to NET SEND. NO amount of scripting will change the behavior and limitations of NET SEND.
Quote:

C:\>net send /?
The syntax of this command is:


NET SEND
{name | * | /DOMAIN[:name] | /USERS} message


_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Henriques) and 2516 anonymous users online.
Newest Members
fgarcia, Viginette, ManuvdWielNL, Sir_Barrington, batdk82
17889 Registered Users

Generated in 0.05 seconds in which 0.026 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org