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!