#43984 - 2003-08-13 11:04 PM
Re: W32LoveSAN
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
Crap!!!
I looked at the "File Version" and not the "Product Version"
GetFileVersion('%windir%\system32\Rpcrt4.dll', 'Productversion') does equal 5.00.2195.6753
File Version equals 5.0.2195.6753
Sorry for my stupidity. But why the difference M$!!
|
|
Top
|
|
|
|
#43985 - 2003-08-13 11:04 PM
Re: W32LoveSAN
|
Radimus
Moderator
   
Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
|
that may a bit more than necessary...
For the most part val(right($value,instrrev($value,'.'))) will get what you need.
unless you are talking about major revisions like in IE
|
|
Top
|
|
|
|
#43986 - 2003-08-13 11:11 PM
Re: W32LoveSAN
|
Radimus
Moderator
   
Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
|
Ok, I'll put it back...
Does this pass the inital review for usefulness?
code:
Function MinorVersion($IfThisIsGreater, $ThanThis, Optional $char) Dim $1,$2 if not $char $char='.' endif $1=val(right($IfThisIsGreater,instrrev($IfThisIsGreater,$char))) $2=val(right($ThanThis,instrrev($ThanThis,$char))) $MinorVersion=iif($1>$2,1,0) endfunction
|
|
Top
|
|
|
|
#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
|
|
|
|
#43989 - 2003-08-14 12:31 AM
Re: W32LoveSAN
|
Radimus
Moderator
   
Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
|
latest ver:
code:
IF @INWIN = 1
$os = split(@ProductType)[1] $csd = val(right(@csd,1)) $admin = ingroup('@wksta\'+sidtoname('S-1-5-32-544'))-1+@INWIN
DIM $KBPath,$KBFile,$RPCver $KBPath = '\\servername\sharename\SP\KB823980' $RPCver = GetFileVersion('%windir%\system32\Rpcrt4.dll', 'Productversion') SELECT CASE $os='NT' and not KeyExist('HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Q823980') $KBFile='Q823980i.EXE /q /z' CASE $os='2000' and $RPCver <> "5.00.2195.6753" $KBFile='Windows2000-KB823980-x86-ENU.exe /u /q /z' CASE $os='XP' and $CSD = 0 and $RPCver <> "5.1.2600.109" $KBFile='WindowsXP-KB823980-x86-ENU.exe /u /q /z' CASE $os='XP' and $CSD = 1 and $RPCver <> "5.1.2600.1230" $KBFile='WindowsXP-KB823980-x86-ENU.exe /u /q /z' CASE 1 $KBFile='' ;? 'Must already be patched' ? $os ? $csd ? $rpcver ENDSELECT IF $KBFile IF $admin SHELL '%comspec% /c '+$KBPath+'\'+$KBFile ELSE $rc=sendmessage(@wksta,'This computer is unpatched for W32LoveSAN, Call IT Support immediately') ENDIF ENDIF ENDIF
|
|
Top
|
|
|
|
#43991 - 2003-08-14 07:00 AM
Re: W32LoveSAN
|
Bob Deerinwater
Starting to like KiXtart
Registered: 2002-05-05
Posts: 101
Loc: Covina California
|
I am curious if you have to have administrative rights on the local pc for this to work or if you are setting that inside the code someplace. I have about 1000 pc's that i have to install this patch on...please Help
|
|
Top
|
|
|
|
#43992 - 2003-08-14 08:12 AM
Re: W32LoveSAN
|
NTDOC
Administrator
   
Registered: 2000-07-28
Posts: 11631
Loc: CA
|
Bob,
In answer to your question YES, your users must already have local Admin rights to use this.
This is a trimmed down version of the script I wrote here.
http://www.kixtart.org/cgi-bin/ultimatebb.cgi?ubb=get_topic&f=2&t=004498
I have another script that you can use REMOTELY if you have a Domain Account with Admin rights on the workstation.
I pieced one together with the help of Rad, Chris, and Howard. Will try to post tomorrow. Too late tonight. Time for me to go home now.
|
|
Top
|
|
|
|
#43994 - 2003-08-14 11:42 AM
Re: W32LoveSAN
|
Radimus
Moderator
   
Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
|
do a search for "Remote Execution Manager"
|
|
Top
|
|
|
|
#43995 - 2003-08-14 06:02 PM
Re: W32LoveSAN
|
Bob Deerinwater
Starting to like KiXtart
Registered: 2002-05-05
Posts: 101
Loc: Covina California
|
Have a simple question about this. Is this assuming that the user has local admin rights. And if the do not how can you run this as a different account
|
|
Top
|
|
|
|
#43996 - 2003-08-14 06:26 PM
Re: W32LoveSAN
|
Radimus
Moderator
   
Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
|
are you talking about remote execution manager?
if so, the user needs no rights... there doesn't even need to be a user as long as the PC is turned on. It executes under the service acct, which is local admin.
|
|
Top
|
|
|
|
#43998 - 2003-08-16 09:39 PM
Re: W32LoveSAN
|
Bob Deerinwater
Starting to like KiXtart
Registered: 2002-05-05
Posts: 101
Loc: Covina California
|
I guess i have to use the SU command to take care of this in logon scripts. 2 techs for 1000 pc's. That might take us all year touching each one.
|
|
Top
|
|
|
|
#43999 - 2003-08-16 09:50 PM
Re: W32LoveSAN
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
Do you have the SUSS.exe installed on all the clients?
|
|
Top
|
|
|
|
#44000 - 2003-08-17 10:14 AM
Re: W32LoveSAN
|
NTDOC
Administrator
   
Registered: 2000-07-28
Posts: 11631
Loc: CA
|
Bob,
You don't need SU service or anything. Don't you have Admin rights on your own systems?
You can remotely install this, or schedule a task.
Even if you don't have admin rights, but you know the local administrator password, you can still do them remotely.
Please see this post for an example. http://www.kixtart.org/board/ultimatebb.php?ubb=get_topic;f=2;t=004517
|
|
Top
|
|
|
|
#44002 - 2003-08-18 08:20 PM
Re: W32LoveSAN
|
Bob Deerinwater
Starting to like KiXtart
Registered: 2002-05-05
Posts: 101
Loc: Covina California
|
I know i can run this as a scheduled task . The issue is mostly political. My direcor does not want to ruffle anyone feathers by installing software that users are not aware of...(Makes no sense to me). But says will be ok in the logon scripts. so that is why i am asumming the su will work. Is there another way?
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 858 anonymous users online.
|
|
|