Doc,

Yeah.. I guess I could agree, but it would add five lines and the variable could be re-used throughout the script..

code:
 IF (@inwin = 1)
$windir = READVALUE("HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion","SystemRoot")
ELSE
$windir = READVALUE("HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion","SystemRoot")
ENDIF

Thanks,

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's