Steve,

Running this code through KiXstrip (note the error lines):

quote:

;($begin)
;
; thu 14-nov-2002 21:43:14 (kix 4.00 vs 2.29e)
;
;Informative KIXSTRIP: input=167 output=167 skip=0
;
;Warning KIXSTRIP: 2 errors in block structure(s). missing statement(s).
; - do:until [0:0]
; - for|each:in|to:step|next [0|0:0|0:0|0]
; - function:endfunction [0:0]
; -ERROR- - if:else:endif [26:4:24]
; - select:case:endselect [0:0:0]
; - while:loop [0:0]
;Warning KIXSTRIP: some lines contains errors or possible errors.
;Informative KIXSTRIP: 26 block_structures found.
;Informative KIXSTRIP: no UDF's found.
;Informative KIXSTRIP: no labels found.
;Summary KIXSTRIP: BREAK CALL DEBUG DISPLAY ENDFUNCTION EXECUTE EXIT FUNCTION GET GETS GOSUB GOTO OLExxx PLAY QUIT RETURN RUN SHELL SLEEP THEN USE
;Informative KIXSTRIP: 1 BREAK
;Informative KIXSTRIP: 1 SHELL
;Informative KIXSTRIP: 13 SLEEP
;Informative KIXSTRIP: 29 USE
;
;($end)
;($begin)
;
;
;($end)

And the code:

code:
 IF INGROUP("Domain Admins")
? "Member of Domain Admins group"

USE G: /delete /persistent
USE G: "\\ATC-CORP\VOL2"
USE L: /delete /persistent
USE L: "\\TK2\TRAKKER"
IF Exist ("c:\windows\\DESKTOP\TRAKKE~1.PIF") = 0
IF Exist ("c:\windows\\DESKTOP\TRAKKE~2.PIF") = 0
IF Exist ("c:\windows\\DESKTOP\ESCROW~1.PIF") = 0
IF Exist ("c:\windows\\DESKTOP\REOESC~1.PIF") = 0
IF Exist ("c:\windows\\DESKTOP\STARDO~1.PIF") = 0

COPY "\\W2K2\netlogon\TRAKKE~1.PIF" "c:\windows\desktop" ;copies Trakker Star shortcut to desktop
COPY "\\W2K2\netlogon\TRAKKE~2.PIF" "c:\windows\desktop" ;copies Trakker Lend shortcut to desktop
COPY "\\W2K2\netlogon\ESCROW~1.PIF" "c:\windows\desktop" ;copies Escrow Docnet shortcut to desktop
COPY "\\W2K2\netlogon\REOESC~1.PIF" "c:\windows\desktop" ;copies Reo Escrow Docnet shortcut to desktop
COPY "\\W2K2\netlogon\STARDO~1.PIF" "c:\windows\desktop" ;copies Star Docnet shortcut to desktop
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
SLEEP 10



IF INGROUP("Everyone")
? "Member of Everyone group"
IF Exist ("c:\windows\RD*") = 0
COPY "\\W2K2\netlogon\RD.BAT" "c:\windows"
COPY "\\W2K2\netlogon\RD.PIF" "c:\windows"
IF Exist ("c:\windows\MSTS*") = 0
COPY "\\W2K2\netlogon\MSTSC.EXE" "c:\windows"
IF Exist ("c:\windows\MSTSCAX.DLL") = 0
COPY "\\W2K2\netlogon\MSTSCAX.DLL" "c:\windows"
ENDIF
ENDIF
ENDIF
SLEEP 3

The others have mentioned: each IF ** must ** have a corresponding ENDIF.

So, if the ENDIF s are added, we get the following:
quote:

;($begin)
;
; thu 14-nov-2002 21:52:07 (kix 4.00 vs 2.29e)
;
;Informative KIXSTRIP: no errors found (input=169 output=169 skip=0).
;
;Summary KIXSTRIP: block structures
; - do:until [0:0]
; - for|each:in|to:step|next [0|0:0|0:0|0]
; - function:endfunction [0:0]
; - if:else:endif [26:4:26]
; - select:case:endselect [0:0:0]
; - while:loop [0:0]
;Informative KIXSTRIP: 26 block_structures found.
;Informative KIXSTRIP: no UDF's found.
;Informative KIXSTRIP: no labels found.
;Summary KIXSTRIP: BREAK CALL DEBUG DISPLAY ENDFUNCTION EXECUTE EXIT FUNCTION GET GETS GOSUB GOTO OLExxx PLAY QUIT RETURN RUN SHELL SLEEP THEN USE
;Informative KIXSTRIP: 1 BREAK
;Informative KIXSTRIP: 1 SHELL
;Informative KIXSTRIP: 13 SLEEP
;Informative KIXSTRIP: 29 USE
;
;($end)

And the resulting code. Looks pretty huh?
code:
 IF INGROUP("Domain Admins")
? "Member of Domain Admins group"

USE G: /delete /persistent
USE G: "\\ATC-CORP\VOL2"
USE L: /delete /persistent
USE L: "\\TK2\TRAKKER"
IF Exist ("c:\windows\\DESKTOP\TRAKKE~1.PIF") = 0
IF Exist ("c:\windows\\DESKTOP\TRAKKE~2.PIF") = 0
IF Exist ("c:\windows\\DESKTOP\ESCROW~1.PIF") = 0
IF Exist ("c:\windows\\DESKTOP\REOESC~1.PIF") = 0
IF Exist ("c:\windows\\DESKTOP\STARDO~1.PIF") = 0

COPY "\\W2K2\netlogon\TRAKKE~1.PIF" "c:\windows\desktop" ;copies Trakker Star shortcut to desktop
COPY "\\W2K2\netlogon\TRAKKE~2.PIF" "c:\windows\desktop" ;copies Trakker Lend shortcut to desktop
COPY "\\W2K2\netlogon\ESCROW~1.PIF" "c:\windows\desktop" ;copies Escrow Docnet shortcut to desktop
COPY "\\W2K2\netlogon\REOESC~1.PIF" "c:\windows\desktop" ;copies Reo Escrow Docnet shortcut to desktop
COPY "\\W2K2\netlogon\STARDO~1.PIF" "c:\windows\desktop" ;copies Star Docnet shortcut to desktop
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
; -- this is the first "fix"
SLEEP 10



IF INGROUP("Everyone")
? "Member of Everyone group"
IF Exist ("c:\windows\RD*") = 0
COPY "\\W2K2\netlogon\RD.BAT" "c:\windows"
COPY "\\W2K2\netlogon\RD.PIF" "c:\windows"
IF Exist ("c:\windows\MSTS*") = 0
COPY "\\W2K2\netlogon\MSTSC.EXE" "c:\windows"
IF Exist ("c:\windows\MSTSCAX.DLL") = 0
COPY "\\W2K2\netlogon\MSTSCAX.DLL" "c:\windows"
ENDIF
ENDIF
ENDIF
ENDIF
; -- this is the second "fix"
SLEEP 3

Note: The block structure of this. It makes it really easy to find and take care of issues with code.

Again, I would go and check out How do we check and format code for scripts.

Note the Batch file to process these through too.. Makes it pretty easy!!

HTH,

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