#44336 - 2003-08-21 10:12 AM
w2k service pack key?
|
Stephen Wintle
Seasoned Scripter
Registered: 2001-04-10
Posts: 444
Loc: England
|
Ive had a look through the registry but cant seem to find a key that shows which service pack the machine is currently using, I want to use this info to update the service pack intalled, does anyone know the registry key that shows this?
Steve.
_________________________
Dont worry because a rival imitates you. As long as they follow in your tracks they cant pass you!
|
|
Top
|
|
|
|
#44338 - 2003-08-22 12:45 AM
Re: w2k service pack key?
|
Stephen Wintle
Seasoned Scripter
Registered: 2001-04-10
Posts: 444
Loc: England
|
Thanks for you reply have tried the following code:
;--------------------------------Installs W2k service pack automatically----------------------------------- If @inwin = "1"
$srvpk="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion" If (ReadValue($srvpk, "CDSVersion", "Service Pack 4", "REG_SZ") <> 0) RUN "G:\W2KSRVPK4\W2KSP4_EN.EXE -u -q -z" Endif
Endif
With the following error: ,= Step Into, = Step Over, "\"= Command, = Go, = Quit If (ReadValue($srvpk, "CDSVersion", "Service Pack", "REG_SZ") <> 0)
C:\>cd .. Invalid directory
C:\>cd\
C:\>cd winnt
C:\WINNT>kix32 /d c:\winnt\hiddrv1.kix Script error: invalid method/function call: too many parameters! If (ReadValue($srvpk, "CDSVersion", "Service Pack", "REG_SZ") <> 0)
C:\WINNT>
Having read the manual it seems I cant use the function in this way. [ 21. August 2003, 12:48: Message edited by: Stephen Wintle ]
_________________________
Dont worry because a rival imitates you. As long as they follow in your tracks they cant pass you!
|
|
Top
|
|
|
|
#44343 - 2003-08-21 02:16 PM
Re: w2k service pack key?
|
Radimus
Moderator
   
Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
|
if split(@producttype)[1]='2000' and split(@csd)[2]<'4' copy '\\server\win2ksp4\w2ksp4_EN.exe' 'c:\' md '%windir%\sp4' shell 'c:\w2ksp4_EN.exe /U /X:%windir%\sp4' sleep 2 del 'c:\w2ksp4_EN.exe' run '%windir%\sp4\i386\update\update.exe /u /N /F ' quit endif
|
|
Top
|
|
|
|
#44344 - 2003-08-21 02:34 PM
Re: w2k service pack key?
|
Stephen Wintle
Seasoned Scripter
Registered: 2001-04-10
Posts: 444
Loc: England
|
Thanks for your reply, however none of my w2k clients have any service pack installed, this means that using the CSDVersion wont work because the key dosnt exsist.
Radimus I see your version copies the file onto the c: root then creates a dir copies the file into here and then deletes from c: and runs the new copy. Why not make the directory and then copy into this?
I like the idea of the script as it means changing one value once the inevitable service pack 5 arrives.
Steve.
_________________________
Dont worry because a rival imitates you. As long as they follow in your tracks they cant pass you!
|
|
Top
|
|
|
|
#44345 - 2003-08-21 02:38 PM
Re: w2k service pack key?
|
Radimus
Moderator
   
Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
|
split(@csd)[2] will return 0 if no SP is installed
copy the exe to the client conserves bandwidth and server time... and is MUCH faster
extracting the files to the client into a folder allows the machine access to the SP files if something needs to reinstall something from the SP
|
|
Top
|
|
|
|
#44349 - 2003-08-22 12:00 AM
Re: w2k service pack key?
|
Radimus
Moderator
   
Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
|
I think so... especially when having lots of clients hit the SP install at once.
copy 1 large compressed file to the client vs. serving hundreds of expanded files
less traffic on the server, and the client does the install faster with all files local.
if space is an issue, you may want to use server based files, but newer machines have nothing but extra space...
|
|
Top
|
|
|
|
#44352 - 2003-08-22 01:21 PM
Re: w2k service pack key?
|
Stephen Wintle
Seasoned Scripter
Registered: 2001-04-10
Posts: 444
Loc: England
|
Thanks for your comments, I guess it makes more sense to run the thing from the client side especially as I work in a school and you can have 30 users logging on at the same time..
I have the following error when running your script Radimus: ,= Step Into, = Step Over, "\"= Command, = Go, = Quit if split(@producttype)[1]='2000' and split(@csd)[2]<'4'
C:\>cd winnt
C:\WINNT>kix32.exe /d hiddrv1.kix Script error: Error in expression: this type of array not supported in expressio ns.! copy 'G:\w2ksp4\w2ksp4_EN.exe' 'c:\'
C:\WINNT>
Regards
Steve.
_________________________
Dont worry because a rival imitates you. As long as they follow in your tracks they cant pass you!
|
|
Top
|
|
|
|
#44354 - 2003-08-22 02:38 PM
Re: w2k service pack key?
|
Kdyer
KiX Supporter
   
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
Really it should be 4.21..
As there were a number of issues addressed with COPY/MOVE/DEL from 4.20, that is recursively.
Kent
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 987 anonymous users online.
|
|
|