#43987 - 2003-08-13 11:28 PM
Re: W32LoveSAN
|
Mart
KiX Supporter
   
Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
|
Just for helping out our infected customers and our engineers (if they would like to use it).
Altered the code posted by Radimus (thanx for the kick in the right direction ), added some things such as the messagebox when the dll is up to date, removed the local admin check and added a separate case for each supported OS type. Not actually necessary but it's more readable to me that way. Not sure about the Win2K3 dll version value. I can’t test on a Win2K3 server yet.
All packed into an exe file to distribute by postal mail or e-mail by our support staff to our infected customers.
[edit] Changed long lines and added correct version number for Win2K3 (5.00.2195.5419). [/edit]
code:
;=============================================================================================== ;**** Created with KiXscripts Editor | http://KiXscripts.com **** ;**** Last Modified on 13-augustus-2003 at 23:09:37 by Administrator **** ;===============================================================================================
;SetConsole ("HIDE")
If @INWIN=1 Dim $KBPath,$KBFile,$KBRequired,$RPCver $KBPath= @SCRIPTDIR + 'patch\' $RPCver=GetFileVersion('%windir%\system32\Rpcrt4.dll', 'Productversion') ; Select Case @ProductType='Windows NT Workstation' $KBFile='RPC_Patch_NT4.EXE' $KBRequired=KeyExist('HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Q823980') If $KBRequired = 0 Shell '%comspec% /c '+$KBPath+'\'+$KBFile+' /q /z' Else MessageBox("The RPC dll on your system is up to date","MS-03-026 RPC patch installation...",64) Goto end EndIf ; Case @ProductType='Windows NT Server' $KBFile='RPC_Patch_NT4.EXE' $KBRequired=KeyExist('HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Q823980') If $KBRequired = 0 Shell '%comspec% /c '+$KBPath+'\'+$KBFile+' /q /z' Else MessageBox("The RPC dll on your system is up to date","MS-03-026 RPC patch installation...",64) Goto end EndIf ; Case @ProductType='Windows NT Domain Controller' $KBFile='RPC_Patch_NT4.EXE' $KBRequired=KeyExist('HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Q823980') If $KBRequired = 0 Shell '%comspec% /c '+$KBPath+'\'+$KBFile+' /q /z' Else MessageBox("The RPC dll on your system is up to date","MS-03-026 RPC patch installation...",64) Goto end EndIf ; Case @ProductType='Windows 2000 Professional' $KBFile='RPC_Patch_Win2K.exe' If $RPCver <> "5.00.2195.6753" Shell '%comspec% /c '+$KBPath+'\'+$KBFile+' /u /q /z' Else MessageBox("The RPC dll on your system is up to date","MS-03-026 RPC patch installation...",64) Goto end EndIf ; Case @ProductType='Windows 2000 Server' $KBFile='RPC_Patch_Win2K.exe' If $RPCver <> "5.00.2195.6753" Shell '%comspec% /c '+$KBPath+'\'+$KBFile+' /u /q /z' Else MessageBox("The RPC dll on your system is up to date","MS-03-026 RPC patch installation...",64) Goto end EndIf ; Case @ProductType='Windows 2000 Domain Controller' $KBFile='RPC_Patch_Win2K.exe' If $RPCver <> "5.00.2195.6753" Shell '%comspec% /c '+$KBPath+'\'+$KBFile+' /u /q /z' Else MessageBox("The RPC dll on your system is up to date","MS-03-026 RPC patch installation...",64) Goto end EndIf ; Case @ProductType='Windows Server 2003' $KBFile='RPC_Patch_Win2K3.exe' If $RPCver <> "5.00.2195.5419" Shell '%comspec% /c '+$KBPath+'\'+$KBFile+' /u /q /z' Else MessageBox("The RPC dll on your system is up to date","MS-03-026 RPC patch installation...",64) Goto end EndIf ; Case @ProductType='Windows Server 2003 Domain Controller' $KBFile='RPC_Patch_Win2K3.exe' If $RPCver <> "5.00.2195.5419" Shell '%comspec% /c '+$KBPath+'\'+$KBFile+' /u /q /z' Else MessageBox("The RPC dll on your system is up to date","MS-03-026 RPC patch installation...",64) Goto end EndIf ; Case @ProductType='Windows XP Home Edition' $KBFile='RPC_Patch_WinXP.exe' If @CSD = 'Service Pack 1' If $RPCver <> "5.1.2600.1230" Shell '%comspec% /c '+$KBPath+'\'+$KBFile+' /u /q /z' Else MessageBox("The RPC dll on your system is up to date","MS-03-026 RPC patch installation...",64) Goto end EndIf Else If $RPCver <> "5.1.2600.109" Shell '%comspec% /c '+$KBPath+'\'+$KBFile+' /u /q /z' Else MessageBox("The RPC dll on your system is up to date","MS-03-026 RPC patch installation...",64) Goto end EndIf EndIf ; Case @ProductType='Windows XP Professional' $KBFile='RPC_Patch_WinXP.exe' If @CSD = 'Service Pack 1' If $RPCver <> "5.1.2600.1230" Shell '%comspec% /c '+$KBPath+'\'+$KBFile+' /u /q /z' Else MessageBox("The RPC dll on your system is up to date","MS-03-026 RPC patch installation...",64) Goto end EndIf Else If $RPCver <> "5.1.2600.109" Shell '%comspec% /c '+$KBPath+'\'+$KBFile+' /u /q /z' Else MessageBox("The RPC dll on your system is up to date","MS-03-026 RPC patch installation...",64) Goto end EndIf EndIf
EndSelect Else MessageBox("The Windows version you are using does not need to be updated.","MS-03-026 RPC patch installation...",64)
EndIf :end
[ 14. August 2003, 10:08: Message edited by: R2D2 ]
_________________________
Mart
- Chuck Norris once sold ebay to ebay on ebay.
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 563 anonymous users online.
|
|
|