My guess is this is Chris G.
Oh, and Welcome to the board.

Anyways... Here is my input on this.


It is more difficult to use the SetOption NoVarInStrings setting, but it will force you
to make sure your script coding is written better.

Code:
Break On

Dim $iRC
$iRC=SetOption('Explicit','On')
$iRC=SetOption('NoVarsInStrings','On')

Dim $HKLMSMWNTCV,$,$LocalAdmin
If @DOS >= '5.0'
$HKLMSMWNTCV = 'HKLM\Software\Microsoft\Windows NT\CurrentVersion'
$LocalAdmin = InGroup(@wksta+'\'+SidToName('S-1-5-32-544'))-1+@INWIN

; Server 2003 should use a GPO to set this sync option
; If GPO not used the user logging on must have Admin rights to modify this key
; I would check if the user is an Admin
;If 1 <> ReadValue($hklms+"\Microsoft\Windows NT\CurrentVersion\Winlogon", "RunLogonScriptSync")
If $LocalAdmin
; Just writing the key each time without checking the current value is faster
$ = WriteValue ($HKLMSMWNTCV + '\Winlogon', 'RunLogonScriptSync', 1, 'REG_DWORD')
EndIf
EndIf

; As Lonkero said these settings should not be needed anymore
; Using the GOTO statement is legal, but frowned upon in general
;If @INWIN=1
;GoTo SETVARNT
;Else
;GoTo SETVAR95
;EndIf

;:SETVAR95
;Shell "winSET.exe USERNAME=@USERID"
;Shell "winSET.exe ADDRESS=@ADDRESS"
;Shell "winSET.exe COMPUTER=@WKSTA"
;Shell "winSET.exe DOMAIN=@DOMAIN"
;Shell "winSET.exe COMMENT=@COMMENT"
;Shell "winSET.exe FULLNAME=@FULLNAME"
;Shell "winSET.exe HOMEDIR=@HOMEDIR"
;Shell "winSET.exe HOMESHR=@HOMESHR"
;Shell "winSET.exe LSERVER=@LSERVER"
;Shell "winSET.exe PRIV=@PRIV"

;GoTo STAGE2

;:SETVARNT
;SET varibles on NT clients using SET command

;Set USERNAME="@USERID"
;SETM ADDRESS="@ADDRESS"
;SETM COMPUTER="@WKSTA"
;SETM DOMAIN="@DOMAIN"
;Set COMMENT="@COMMENT"
;Set FULLNAME="@FULLNAME"
;Set HOMEDIR="@HOMEDIR"
;Set HOMESHR="@HOMESHR"
;Set LSERVER="@LSERVER"
;Set PRIV="@PRIV"

;:STAGE2
;synchronizing with timeserver
SetTime \\S01
;EndIf

;delete any previous drive mappings and check for errors
Use "*" /DELETE /PERSISTENT
; I did not follow all the IF statements, but looks like you may have one or more EndIf without If
;EndIf

;MAP Drives By Group Membership
;Map common drives for Domain Users

; Not positive but I think DOMAIN is a reserved word.
; InGroup checks group membership. You can use something like
; $MyDomain = @DOMAIN
; If $MyDomain='PHOTOSRUS'
;If InGroup ("Domain") = 1

Use S: '\\S01\shared'
Use P: '\\S01\programs'
; Test and make sure @HOMESHR returns the expected value before attempting to map it
Use H: @HOMESHR

EndIf

; By default KiXtart uses .KIX and .SCR (however screen saver modules also use .SCR
; It would probably be better to get in the habit of using either .KIX or maybe something like
; .KXW (for WKIX32.EXE) and .KXD (for KIX32.EXE) or just .KIX in general
Call LOGSCREEN.SRC