Dear,

We have verify your code with kixstrip tool and
we are missing one ENDIF statement.
We couldn't verify at the moment KiXscripts Editor accept this
code.

code:
 ;**** Created with KiXscripts Editor | http://KiXscripts.com ****
;**** Last Modified on 2/24/2003 at 11:47:08 AM by mmontgomery ****
; Revised By Matthew T. Montgomery (mmontgomery@sussexcounty.net)

;? 'Error = '+@ERROR+' - '+@SERROR
;Error checking per line

;***************************************************************************************************************************
;Copy Kix32.exe and My Computer Information.kix Shortcut To The Client PC's Desktop - For Windows 2000
;***************************************************************************************************************************

;MD c:\Kixscripts
;If NOT Exist('c:\Kixscripts\kix32.exe')
;Copy '\\sussex1\netlogon\Kixtart\kix32.exe' 'c:\Kixscripts'
;EndIf
;If NOT Exist('c:\Kixscripts\My Computer Info.kix')
;Copy '\\sussex1\netlogon\Kixtart\My Computer Information.kix' 'c:\Kixscripts'
;EndIf
$desktop = ReadValue("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders","Desktop")
IF NOT Exist('$desktop\My Computer Information.lnk')
COPY '\\sussex1\netlogon\Kixtart\My Computer Information.lnk' '$desktop'
ENDIF


;******************************************************************************
; Check the following key for W2k Machines to make the window not run minimized
;******************************************************************************

IF @dos >= "5.0"
$hklms = 'HKEY_LOCAL_MACHINE\SOFTWARE'
IF 1 <> ReadValue($hklms+"\Microsoft\Windows NT\CurrentVersion\Winlogon", "RunLogonScriptSync")
$ = WriteValue ($hklms+"\Microsoft\Windows NT\CurrentVersion\Winlogon", "RunLogonScriptSync", "1", "REG_DWORD")
ENDIF
ENDIF

;************************************************************
;Windows MessageBox To Greet The User And Display Information
;************************************************************

MessageBox(" Hello @FULLNAME - today is @DAY @MDAYNO @MONTH *** You are logging onto the @DOMAIN Domain *** Your current user rights are @Priv Your Password will expire in @PWAGE days. Host Name: @HOSTNAME IP address: @IPADDRESS0 Your System Specifications = @PRODUCTTYPE, @MHZ Mhz @CPU","Sussex Domain Logon",64,5)

; ------------------------------------------------------------------------
; @MHZ = processor speed
; @CPU = processor type
; @TIME = curent time
; @fullname = shows users full name as entered on Server logon credentials
; @wksta = workstation name as entered on the local PC
; ------------------------------------------------------------------------

;***********************************
; Synchronize Time From "Sussex-DC1"
;***********************************
SETTIME "\\SUSSEX-DC1"

;*****************
;Clears The Screen
;*****************
CLS

;***************************************************
;Disables The Ability To Interrupt The Script Window
;***************************************************
BREAK OFF

;***********************************
;Deletes all currently mapped drives
;***********************************
USE "*" /delete

;*******************************************
; Network Drive Mappings by Group Membership
;*******************************************
IF InGroup('Domain Users')
? 'I: (\\Sussex-FS-1\General)'
USE I: '\\Sussex-FS-1\General'
? 'P: (\\Sussex1\Users\@USERID)'
USE P: '\\Sussex1\USERS\@USERID'
? 'S: (\\Sussex1\Shared)'
USE S: '\\Sussex1\Shared'
ENDIF

IF InGroup('Information Systems')
? 'W: (\\Sussex-FS-2\Information Systems)'
USE W: '\\Sussex-FS-2\Information Systems'
ENDIF

IF InGroup('Mapping And Addressing')
? 'G: (\\Sussex1\Global)'
USE G: '\\Sussex1\Global'
? 'R: (\\Sussex1\ReAddressing)'
USE R: '\\Sussex1\ReAddressing'
? 'V: (\\Sussex1\View)'
USE V: '\\Sussex1\View'
? 'Z: (\\Sussex-fs-1\Aerial_Photos)'
USE Z: '\\Sussex-fs-1\Aerial_Photos'
ENDIF

;************************************
;Printer Mappings by Group Membership
;************************************
IF InGroup('Information Systems')
$rc=AddPrinterConnection("\\Sussex-DC2\IS HP LaserJet 4100tn")
IF $rc=0
? "Adding printer, IS HP LaserJet 4100tn"
$rc=AddPrinterConnection("\\Sussex-DC2\IS HP Color LaserJet 4550")
IF $rc=0
? "Adding printer, IS HP Color LaserJet 4500"
ELSE
? "$$RC = "+$rc
? "@@Error = "+@error
? "@@SError = "+@serror
ENDIF
ENDIF

;**********************************************************************************************
; Checks for Exchange Server Profile, If Not, Creates One (Tested On Windows 2000 Professional)
;**********************************************************************************************
$index = 0
$keyfound = 0

$search_location="HKEY_CURRENT_USER\Software\Microsoft\Windows Messaging Subsystem\Profiles"
IF (KeyExist($search_location) = 1) ; 1 if found
$keyname = EnumKey("HKEY_CURRENT_USER\Software\Microsoft\Windows Messaging Subsystem\Profiles", $index)
WHILE @error = 0
$keyfound = $keyfound + 1
$index = $index + 1
$keyname = EnumKey("HKEY_CURRENT_USER\Software\Microsoft\Windows Messaging Subsystem\Profiles", $index)
LOOP
ELSE
$search_location="HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles"
IF (KeyExist($search_location) = 1) ; 3 if found
$keyname = EnumKey("HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles", $index)
WHILE @error = 0
$keyfound = $keyfound + 1
$index = $index + 1
$keyname = EnumKey("HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles", $index)
LOOP
ENDIF
; 3 if end
ENDIF
;1 if end


IF $keyfound = 0
$createprofile = @lserver + "\NETLOGON\Profgen.exe " + @lserver + "\NETLOGON\Newprof.exe -P " + @lserver + "\NETLOGON\Custom.prf -X -R -L"
RUN $createprofile
? "Email profile created"
; profgen.exe, newprof.exe and custom.prf can be found at http://www.microsoft.com/downloads/search.asp? in a file called idk99.exe
; or email noelh@clara.net for the files.
ENDIF

;********************************************************
;Script Window Stays Focused For Specified Amount Of Time
;********************************************************
SLEEP 2 ; Wait for 5 sec

;***********************
;Exits The Script Window
;***********************
EXIT

;($begin)
;
; wed 26-feb-2003 03:42:36 (kix 4.20 vs 4.00e)
;
;Informative KIXSTRIP: input=158 output=158 skip=0
;
;Warning KIXSTRIP: 1 error in block structure. 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 [12:2:11]
; - select:case:endselect [0:0:0]
; - while:loop [2:2]
;Warning KIXSTRIP: some lines contains errors or possible errors.
;Informative KIXSTRIP: 14 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 EXIT
;Informative KIXSTRIP: 1 RUN
;Informative KIXSTRIP: 1 SLEEP
;Informative KIXSTRIP: 9 USE
;
;($end)
;($begin)
;
;
;($end)

we think that
code:
       IF $rc=0
? "Adding printer, IS HP LaserJet 4100tn"
$rc=AddPrinterConnection("\\Sussex-DC2\IS HP Color LaserJet 4550")
IF $rc=0
? "Adding printer, IS HP Color LaserJet 4500"
ELSE
? "$$RC = "+$rc
? "@@Error = "+@error
? "@@SError = "+@serror
ENDIF

should be
code:
       IF $rc=0
? "Adding printer, IS HP LaserJet 4100tn"
ENDIF
$rc=AddPrinterConnection("\\Sussex-DC2\IS HP Color LaserJet 4550")
IF $rc=0
? "Adding printer, IS HP Color LaserJet 4500"
ELSE
? "$$RC = "+$rc
? "@@Error = "+@error
? "@@SError = "+@serror
ENDIF

greetings.
_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA