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