Page 2 of 3 <123>
Topic Options
#43983 - 2003-08-13 10:52 PM Re: W32LoveSAN
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
See also CompareVersions() - Compares two multi-segment version strings
_________________________
There are two types of vessels, submarines and targets.

Top
#43984 - 2003-08-13 11:04 PM Re: W32LoveSAN
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Crap!!! [Mad]

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 [Embarrassed]

Sorry for my stupidity. But why the difference M$!! [Embarrassed] [Mad] [Big Grin] [Eek!]
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#43985 - 2003-08-13 11:04 PM Re: W32LoveSAN
Radimus Moderator Offline
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
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#43986 - 2003-08-13 11:11 PM Re: W32LoveSAN
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
Ok, I'll put it back... [Big Grin] [Razz]

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

_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#43987 - 2003-08-13 11:28 PM Re: W32LoveSAN
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
Just for helping out our infected customers [Razz] and our engineers (if they would like to use it).

Altered the code posted by Radimus (thanx for the kick in the right direction [Big Grin] ), 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
#43988 - 2003-08-13 11:55 PM Re: W32LoveSAN
Chris S. Offline
MM club member
*****

Registered: 2002-03-18
Posts: 2368
Loc: Earth
Hey, R2. Can you clean up the long lines?
Top
#43989 - 2003-08-14 12:31 AM Re: W32LoveSAN
Radimus Moderator Offline
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

_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#43990 - 2003-08-14 02:50 AM Re: W32LoveSAN
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11631
Loc: CA
LONG LINE POLICE - Howard!!

Not sure what is going on for you guys. Patch does not keep applying on my systems using the exact code as I originally posted.

Have not gone to workstations and checked, but does not seem to be an issue on any of my test systems.

Top
#43991 - 2003-08-14 07:00 AM Re: W32LoveSAN
Bob Deerinwater Offline
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 Offline
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
#43993 - 2003-08-14 09:51 AM Re: W32LoveSAN
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
quote:

Hey, R2. Can you clean up the long lines?

Sorry, my mistake.
Edited messagebox text.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#43994 - 2003-08-14 11:42 AM Re: W32LoveSAN
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
do a search for "Remote Execution Manager"
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#43995 - 2003-08-14 06:02 PM Re: W32LoveSAN
Bob Deerinwater Offline
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 Offline
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.
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#43997 - 2003-08-14 06:43 PM Re: W32LoveSAN
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11631
Loc: CA
But it DOES require that the person executing the script have an account that has Local Administrative rights to perform the execution of the RemoteExec() UDF.
Top
#43998 - 2003-08-16 09:39 PM Re: W32LoveSAN
Bob Deerinwater Offline
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 Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Do you have the SUSS.exe installed on all the clients?
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#44000 - 2003-08-17 10:14 AM Re: W32LoveSAN
NTDOC Administrator Offline
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
#44001 - 2003-08-18 03:24 AM Re: W32LoveSAN
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
And a look at the FAQ Forum would help, too: Installing an Application as an Admin . Or search the board for 'Task Scheduler' and take a look at the ScheduleTask() UDF.
_________________________
There are two types of vessels, submarines and targets.

Top
#44002 - 2003-08-18 08:20 PM Re: W32LoveSAN
Bob Deerinwater Offline
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
Page 2 of 3 <123>


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

Who's Online
0 registered and 665 anonymous users online.
Newest Members
Sir_Barrington, batdk82, StuTheCoder, M_Moore, BeeEm
17886 Registered Users

Generated in 0.392 seconds in which 0.303 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