#73679 - 2003-02-26 03:56 AM
Re: Logon script for multi groups
|
MCA
KiX Supporter
   
Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
|
Dear,
We have add some debugging code to two of the scripts. We did it with our kixstrip tool.
First your version dated as 25 February 2003 19:39 Secondly Howard's version dated as 25 February 2003 20:15 After running a file will automatically created. It contains information about - which lines were executed - what was the error status - what was the moment of execution The file is calling %tmp%\kixdebug.txt. Please return the contents of this file to the board.
Your version
code:
;CLS IF (instr("-3.0x-3.1x-3.2x-3.3x-","-"+substr(@kix,1,3)+"x-") <> 0) IF MessageBox("sorry, your kixtart "+@kix+" release is too old."+CHR(13)+CHR(10)+CHR(13)+CHR(10)+" please upgrade.","KiXtart "+@kix+" info",4112,300) ENDIF EXIT ENDIF COLOR C+/N ;AT (1,1) " "
$_debug_file="kixdebug.txt" ; - %tmp% directory - IF (len($_debug_file) <> 0) IF (substr("%tmp%",len("%tmp%"),1) = "\") $_debug_file="%tmp%"+$_debug_file ELSE $_debug_file="%tmp%\"+$_debug_file ENDIF ENDIF ;$_debug_file="c:\kixdebug.txt" IF RedirectOutput($_debug_file) ENDIF
? "-"+LCASE(@day)+" "+@date+" "+@time+"- kixtart "+@kix+"/4.00e script starting" IF (Val(substr(@kix,1,1)) >= 4) IF (len(@scriptname) <> 0) " ("+LCASE(@scriptname)+")" ENDIF ENDIF ? "-" IF ("$_debug_already_starting" <> "yes") ? "-curdir: "+LCASE(@curdir) ? "-scriptdir: "+LCASE(@scriptdir) IF (instr("-4.1x-","-"+substr(@kix,1,3)+"x-") <> 0) ? "-scriptname: "+LCASE(@scriptname) ENDIF ? "-startdir: "+LCASE(@startdir) ? "-" ? "-userid: "+LCASE(@userid)+"/"+LCASE(@wuserid) ? "-user priv: "+LCASE(@priv) IF (instr("-4.xx-","-"+substr(@kix,1,2)+"xx-") <> 0) ? "-version: inwin="+@inwin+"/dos="+@dos+"/productsuite="+@productsuite+"/producttype="+@producttype+"/csd="+LTRIM(RTRIM(@csd)) ELSE ? "-version: inwin="+@inwin+"/dos="+@dos ENDIF ? "-" IF (instr("-4.1x-","-"+substr(@kix,1,3)+"x-") <> 0) ? "-"+@cpu+" (memory "+MemorySize()+" MB)" ? "-" ENDIF ENDIF
$_debug_temp_name="" ; -format: yyyymmdd_hhmmss.sss_999 scriptname- IF (instr("-3.6x-","-"+substr(@kix,1,3)+"x-") <> 0) OR (Val(substr(@kix,1,1)) >= 4) IF (instr("-4.xx-","-"+substr(@kix,1,2)+"xx-") <> 0) $_debug_temp_name=@msecs SELECT CASE (len($_debug_temp_name) = 1) $_debug_temp_name="00"+$_debug_temp_name CASE (len($_debug_temp_name) = 2) $_debug_temp_name="0"+$_debug_temp_name ENDSELECT $_debug_temp_name="."+$_debug_temp_name IF Srnd(@msecs) ENDIF SLEEP 0.050 ELSE IF Srnd((-1)*32767/(substr(@time,7,2)+1)) ENDIF SLEEP 1 ENDIF $_debug_temp_name=substr(@date,1,4)+substr(@date,6,2)+substr(@date,9,2)+"_"+substr(@time,1,2)+substr(@time,4,2)+substr(@time,7,2)+$_debug_temp_name+"_"+Rnd() IF (len($_debug_temp_name) < 25) $_debug_temp_name=substr($_debug_temp_name+" ",1,25) ENDIF IF (instr("-4.1x-","-"+substr(@kix,1,3)+"x-") <> 0) IF (len(@scriptname) < 12) $_debug_temp_name=$_debug_temp_name+" "+substr(@scriptname+" ",1,12) ELSE $_debug_temp_name=$_debug_temp_name+" "+@scriptname ENDIF ENDIF ENDIF
IF ("$_debug_already_starting" <> "yes") ? "-debug file: "+$_debug_file ? "-debug name: "+LCASE($_debug_temp_name) ELSE IF (len($_debug_temp_name) <> 0) ? "-debug: "+LTRIM(RTRIM(LCASE($_debug_temp_name)))+" -> "+$_debug_file ELSE ? "-debug-file: "+$_debug_file ENDIF ENDIF
IF (instr("-3.6x-","-"+substr(@kix,1,3)+"x-") = 0) AND (Val(substr(@kix,1,1)) < 4) GOTO _debug_starting_point ENDIF DIM $_debug_name ; -create local variable- :_debug_starting_point $_debug_name=LCASE($_debug_temp_name) $_debug_already_starting="yes" ? "-" ?"----- start-"+@time+"-"+$_debug_name+"- @error @serror"?
?"- 1-"+@time+"-"+$_debug_name+"- @error @serror"? ;SetConsole ("HIDE") ?"- 2-"+@time+"-"+$_debug_name+"- @error @serror"? ?"- 3-"+@time+"-"+$_debug_name+"- @error @serror"? IF (InGroup ("Office Staff") <> 0) ?"- 4-"+@time+"-"+$_debug_name+"- @error @serror"? USE p: /delete ?"- 5-"+@time+"-"+$_debug_name+"- @error @serror"? USE p: "\\josmith1\Jo Smith & Associates\Public" ?"- 6-"+@time+"-"+$_debug_name+"- @error @serror"? USE o: /delete ?"- 7-"+@time+"-"+$_debug_name+"- @error @serror"? USE o: "\\josmith1\Jo Smith & Associates\OfficeStaff" ?"- 8-"+@time+"-"+$_debug_name+"- @error @serror"? USE s: /delete ?"- 9-"+@time+"-"+$_debug_name+"- @error @serror"? USE s: "\\josmith1\Jo Smith & Associates\ScanDocs" ?"- 10-"+@time+"-"+$_debug_name+"- @error @serror"? USE n: /delete ?"- 11-"+@time+"-"+$_debug_name+"- @error @serror"? USE n: "\\josmith1\Jo Smith & Associates\Temp Employees" ?"- 12-"+@time+"-"+$_debug_name+"- @error @serror"? ENDIF ?"- 13-"+@time+"-"+$_debug_name+"- @error @serror"? ?"- 14-"+@time+"-"+$_debug_name+"- @error @serror"? IF (InGroup ("Call Center") <> 0) ?"- 15-"+@time+"-"+$_debug_name+"- @error @serror"? USE p: /delete ?"- 16-"+@time+"-"+$_debug_name+"- @error @serror"? USE p: "\\josmith1\Jo Smith & Associates\Public" ?"- 17-"+@time+"-"+$_debug_name+"- @error @serror"? USE t: /delete ?"- 18-"+@time+"-"+$_debug_name+"- @error @serror"? USE t: "\\josmith1\Jo Smith & Associates\CallCenter" ?"- 19-"+@time+"-"+$_debug_name+"- @error @serror"? USE s: /delete ?"- 20-"+@time+"-"+$_debug_name+"- @error @serror"? USE s: "\\josmith1\Jo Smith & Associates\ScanDocs" ?"- 21-"+@time+"-"+$_debug_name+"- @error @serror"? USE n: /delete ?"- 22-"+@time+"-"+$_debug_name+"- @error @serror"? USE n: "\\josmith1\Jo Smith & Associates\Temp Employees" ?"- 23-"+@time+"-"+$_debug_name+"- @error @serror"? ENDIF ?"- 24-"+@time+"-"+$_debug_name+"- @error @serror"? ?"- 25-"+@time+"-"+$_debug_name+"- @error @serror"? IF (InGroup ("CCAdmin") <> 0) ?"- 26-"+@time+"-"+$_debug_name+"- @error @serror"? USE j: /delete ?"- 27-"+@time+"-"+$_debug_name+"- @error @serror"? USE j: "\\josmith1\Jo Smith & Associates\Jo Doc" ?"- 28-"+@time+"-"+$_debug_name+"- @error @serror"? USE p: /delete ?"- 29-"+@time+"-"+$_debug_name+"- @error @serror"? USE p: "\\josmith1\Jo Smith & Associates\Public" ?"- 30-"+@time+"-"+$_debug_name+"- @error @serror"? USE t: /delete ?"- 31-"+@time+"-"+$_debug_name+"- @error @serror"? USE t: "\\josmith1\Jo Smith & Associates\CallCenter" ?"- 32-"+@time+"-"+$_debug_name+"- @error @serror"? USE s: /delete ?"- 33-"+@time+"-"+$_debug_name+"- @error @serror"? USE s: "\\josmith1\Jo Smith & Associates\ScanDocs" ?"- 34-"+@time+"-"+$_debug_name+"- @error @serror"? USE m: /delete ?"- 35-"+@time+"-"+$_debug_name+"- @error @serror"? USE m: "\\josmith1\Jo Smith & Associates\Accounting" ?"- 36-"+@time+"-"+$_debug_name+"- @error @serror"? USE n: /delete ?"- 37-"+@time+"-"+$_debug_name+"- @error @serror"? USE n: "\\josmith1\Jo Smith & Associates\Temp Employees" ?"- 38-"+@time+"-"+$_debug_name+"- @error @serror"? ENDIF ?"- 39-"+@time+"-"+$_debug_name+"- @error @serror"? ?"- 40-"+@time+"-"+$_debug_name+"- @error @serror"? IF (InGroup ("Office Admin") <> 0) ?"- 41-"+@time+"-"+$_debug_name+"- @error @serror"? USE j: /delete ?"- 42-"+@time+"-"+$_debug_name+"- @error @serror"? USE j: "\\josmith1\Jo Smith & Associates\Jo Doc" ?"- 43-"+@time+"-"+$_debug_name+"- @error @serror"? USE p: /delete ?"- 44-"+@time+"-"+$_debug_name+"- @error @serror"? USE p: "\\josmith1\Jo Smith & Associates\Public" ?"- 45-"+@time+"-"+$_debug_name+"- @error @serror"? USE o: /delete ?"- 46-"+@time+"-"+$_debug_name+"- @error @serror"? USE o: "\\josmith1\Jo Smith & Associates\OfficeStaff" ?"- 47-"+@time+"-"+$_debug_name+"- @error @serror"? USE s: /delete ?"- 48-"+@time+"-"+$_debug_name+"- @error @serror"? USE s: "\\josmith1\Jo Smith & Associates\ScanDocs" ?"- 49-"+@time+"-"+$_debug_name+"- @error @serror"? USE m: /delete ?"- 50-"+@time+"-"+$_debug_name+"- @error @serror"? USE m: "\\josmith1\Jo Smith & Associates\Accounting" ?"- 51-"+@time+"-"+$_debug_name+"- @error @serror"? USE n: /delete ?"- 52-"+@time+"-"+$_debug_name+"- @error @serror"? USE n: "\\josmith1\Jo Smith & Associates\Temp Employees" ?"- 53-"+@time+"-"+$_debug_name+"- @error @serror"? ENDIF ?"- 54-"+@time+"-"+$_debug_name+"- @error @serror"? ?"- 55-"+@time+"-"+$_debug_name+"- @error @serror"? IF (InGroup ("President") <> 0) ?"- 56-"+@time+"-"+$_debug_name+"- @error @serror"? USE j: /delete ?"- 57-"+@time+"-"+$_debug_name+"- @error @serror"? USE j: "\\josmith1\Jo Smith & Associates\Jo Doc" ?"- 58-"+@time+"-"+$_debug_name+"- @error @serror"? USE p: /delete ?"- 59-"+@time+"-"+$_debug_name+"- @error @serror"? USE p: "\\josmith1\Jo Smith & Associates\Public" ?"- 60-"+@time+"-"+$_debug_name+"- @error @serror"? USE s: /delete ?"- 61-"+@time+"-"+$_debug_name+"- @error @serror"? USE s: "\\josmith1\Jo Smith & Associates\ScanDocs" ?"- 62-"+@time+"-"+$_debug_name+"- @error @serror"? USE m: /delete ?"- 63-"+@time+"-"+$_debug_name+"- @error @serror"? USE m: "\\josmith1\Jo Smith & Associates\Accounting" ?"- 64-"+@time+"-"+$_debug_name+"- @error @serror"? USE n: /delete ?"- 65-"+@time+"-"+$_debug_name+"- @error @serror"? USE n: "\\josmith1\Jo Smith & Associates\Temp Employees" ?"- 66-"+@time+"-"+$_debug_name+"- @error @serror"? ENDIF ?"- 67-"+@time+"-"+$_debug_name+"- @error @serror"? ?"- 68-"+@time+"-"+$_debug_name+"- @error @serror"? EXIT
?"------- end-"+@time+"-"+$_debug_name+"- @error @serror" ? "-" ? "-"+LCASE(@day)+" "+@date+" "+@time+"- kixtart "+@kix+"/4.00e script ending" IF (Val(substr(@kix,1,1)) >= 4) IF (len(@scriptname) <> 0) " ("+LCASE(@scriptname)+")" ENDIF ENDIF ? "-" IF RedirectOutput("CON") ENDIF COLOR C+/N ? ? "Informative KIX "+@kix+":"+" debug info see "+CHR(34)+$_debug_file+CHR(34) IF (Val(substr(@kix,1,1)) >= 4) IF (len(@scriptname) <> 0) " ("+LCASE(@scriptname)+")" ENDIF ENDIF IF RedirectOutput($_debug_file) ENDIF ;($begin) ; ; wed 26-feb-2003 03:34:18 (kix 4.20 vs 4.00e) ; ;Informative KIXSTRIP: no errors found (input=68 output=68 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 [5:0:5] ; - select:case:endselect [0:0:0] ; - while:loop [0:0] ;Informative KIXSTRIP: 5 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 EXIT ;Informative KIXSTRIP: 50 USE ; ;($end)
Howard's version
code:
;CLS IF (instr("-3.0x-3.1x-3.2x-3.3x-","-"+substr(@kix,1,3)+"x-") <> 0) IF MessageBox("sorry, your kixtart "+@kix+" release is too old."+CHR(13)+CHR(10)+CHR(13)+CHR(10)+" please upgrade.","KiXtart "+@kix+" info",4112,300) ENDIF EXIT ENDIF COLOR C+/N ;AT (1,1) " "
$_debug_file="kixdebug.txt" ; - %tmp% directory - IF (len($_debug_file) <> 0) IF (substr("%tmp%",len("%tmp%"),1) = "\") $_debug_file="%tmp%"+$_debug_file ELSE $_debug_file="%tmp%\"+$_debug_file ENDIF ENDIF ;$_debug_file="c:\kixdebug.txt" IF RedirectOutput($_debug_file) ENDIF
? "-"+LCASE(@day)+" "+@date+" "+@time+"- kixtart "+@kix+"/4.00e script starting" IF (Val(substr(@kix,1,1)) >= 4) IF (len(@scriptname) <> 0) " ("+LCASE(@scriptname)+")" ENDIF ENDIF ? "-" IF ("$_debug_already_starting" <> "yes") ? "-curdir: "+LCASE(@curdir) ? "-scriptdir: "+LCASE(@scriptdir) IF (instr("-4.1x-","-"+substr(@kix,1,3)+"x-") <> 0) ? "-scriptname: "+LCASE(@scriptname) ENDIF ? "-startdir: "+LCASE(@startdir) ? "-" ? "-userid: "+LCASE(@userid)+"/"+LCASE(@wuserid) ? "-user priv: "+LCASE(@priv) IF (instr("-4.xx-","-"+substr(@kix,1,2)+"xx-") <> 0) ? "-version: inwin="+@inwin+"/dos="+@dos+"/productsuite="+@productsuite+"/producttype="+@producttype+"/csd="+LTRIM(RTRIM(@csd)) ELSE ? "-version: inwin="+@inwin+"/dos="+@dos ENDIF ? "-" IF (instr("-4.1x-","-"+substr(@kix,1,3)+"x-") <> 0) ? "-"+@cpu+" (memory "+MemorySize()+" MB)" ? "-" ENDIF ENDIF
$_debug_temp_name="" ; -format: yyyymmdd_hhmmss.sss_999 scriptname- IF (instr("-3.6x-","-"+substr(@kix,1,3)+"x-") <> 0) OR (Val(substr(@kix,1,1)) >= 4) IF (instr("-4.xx-","-"+substr(@kix,1,2)+"xx-") <> 0) $_debug_temp_name=@msecs SELECT CASE (len($_debug_temp_name) = 1) $_debug_temp_name="00"+$_debug_temp_name CASE (len($_debug_temp_name) = 2) $_debug_temp_name="0"+$_debug_temp_name ENDSELECT $_debug_temp_name="."+$_debug_temp_name IF Srnd(@msecs) ENDIF SLEEP 0.050 ELSE IF Srnd((-1)*32767/(substr(@time,7,2)+1)) ENDIF SLEEP 1 ENDIF $_debug_temp_name=substr(@date,1,4)+substr(@date,6,2)+substr(@date,9,2)+"_"+substr(@time,1,2)+substr(@time,4,2)+substr(@time,7,2)+$_debug_temp_name+"_"+Rnd() IF (len($_debug_temp_name) < 25) $_debug_temp_name=substr($_debug_temp_name+" ",1,25) ENDIF IF (instr("-4.1x-","-"+substr(@kix,1,3)+"x-") <> 0) IF (len(@scriptname) < 12) $_debug_temp_name=$_debug_temp_name+" "+substr(@scriptname+" ",1,12) ELSE $_debug_temp_name=$_debug_temp_name+" "+@scriptname ENDIF ENDIF ENDIF
IF ("$_debug_already_starting" <> "yes") ? "-debug file: "+$_debug_file ? "-debug name: "+LCASE($_debug_temp_name) ELSE IF (len($_debug_temp_name) <> 0) ? "-debug: "+LTRIM(RTRIM(LCASE($_debug_temp_name)))+" -> "+$_debug_file ELSE ? "-debug-file: "+$_debug_file ENDIF ENDIF
IF (instr("-3.6x-","-"+substr(@kix,1,3)+"x-") = 0) AND (Val(substr(@kix,1,1)) < 4) GOTO _debug_starting_point ENDIF DIM $_debug_name ; -create local variable- :_debug_starting_point $_debug_name=LCASE($_debug_temp_name) $_debug_already_starting="yes" ? "-" ?"----- start-"+@time+"-"+$_debug_name+"- @error @serror"?
?"- 1-"+@time+"-"+$_debug_name+"- @error @serror"? SetConsole ("HIDE") ?"- 2-"+@time+"-"+$_debug_name+"- @error @serror"? ?"- 3-"+@time+"-"+$_debug_name+"- @error @serror"? ; Drives N:, P:, S: were listed in each group so I placed it in the script only once ?"- 4-"+@time+"-"+$_debug_name+"- @error @serror"? mapdrive("N:", "josmith1", "Jo Smith & Associates\Temp Employees") ?"- 5-"+@time+"-"+$_debug_name+"- @error @serror"? mapdrive("P:", "josmith1", "Jo Smith & Associates\Public") ?"- 6-"+@time+"-"+$_debug_name+"- @error @serror"? mapdrive("S:", "josmith1", "Jo Smith & Associates\ScanDocs") ?"- 7-"+@time+"-"+$_debug_name+"- @error @serror"? ?"- 8-"+@time+"-"+$_debug_name+"- @error @serror"? IF InGroup ("Office Staff") ?"- 9-"+@time+"-"+$_debug_name+"- @error @serror"? writelog("member of 'Office Staff'") ?"- 10-"+@time+"-"+$_debug_name+"- @error @serror"? mapdrive("O:", "josmith1", "Jo Smith & Associates\OfficeStaff") ?"- 11-"+@time+"-"+$_debug_name+"- @error @serror"? ELSE ?"- 12-"+@time+"-"+$_debug_name+"- @error @serror"? writelog("Not a member of 'Office Staff'") ?"- 13-"+@time+"-"+$_debug_name+"- @error @serror"? ENDIF ?"- 14-"+@time+"-"+$_debug_name+"- @error @serror"? ?"- 15-"+@time+"-"+$_debug_name+"- @error @serror"? IF InGroup ("Call Center") ?"- 16-"+@time+"-"+$_debug_name+"- @error @serror"? writelog("member of 'Call Center'") ?"- 17-"+@time+"-"+$_debug_name+"- @error @serror"? mapdrive("T:", "josmith1", "Jo Smith & Associates\CallCenter") ?"- 18-"+@time+"-"+$_debug_name+"- @error @serror"? ELSE ?"- 19-"+@time+"-"+$_debug_name+"- @error @serror"? writelog("Not a member of 'Call Center'") ?"- 20-"+@time+"-"+$_debug_name+"- @error @serror"? ENDIF ?"- 21-"+@time+"-"+$_debug_name+"- @error @serror"? ?"- 22-"+@time+"-"+$_debug_name+"- @error @serror"? IF InGroup ("CCAdmin") ?"- 23-"+@time+"-"+$_debug_name+"- @error @serror"? writelog("member of 'CCAdmin'") ?"- 24-"+@time+"-"+$_debug_name+"- @error @serror"? mapdrive("J:", "josmith1", "Jo Smith & Associates\Jo Doc") ?"- 25-"+@time+"-"+$_debug_name+"- @error @serror"? mapdrive("T:", "josmith1", "Jo Smith & Associates\CallCenter") ?"- 26-"+@time+"-"+$_debug_name+"- @error @serror"? mapdrive("M:", "josmith1", "Jo Smith & Associates\Accounting") ?"- 27-"+@time+"-"+$_debug_name+"- @error @serror"? ELSE ?"- 28-"+@time+"-"+$_debug_name+"- @error @serror"? writelog("Not a member of 'CCAdmin'") ?"- 29-"+@time+"-"+$_debug_name+"- @error @serror"? ENDIF ?"- 30-"+@time+"-"+$_debug_name+"- @error @serror"? ?"- 31-"+@time+"-"+$_debug_name+"- @error @serror"? IF InGroup ("Office Admin") ?"- 32-"+@time+"-"+$_debug_name+"- @error @serror"? writelog("member of 'Office Admin'") ?"- 33-"+@time+"-"+$_debug_name+"- @error @serror"? mapdrive("J:", "josmith1", "Jo Smith & Associates\Jo Doc") ?"- 34-"+@time+"-"+$_debug_name+"- @error @serror"? mapdrive("O:", "josmith1", "Jo Smith & Associates\OfficeStaff") ?"- 35-"+@time+"-"+$_debug_name+"- @error @serror"? mapdrive("M:", "josmith1", "Jo Smith & Associates\Accounting") ?"- 36-"+@time+"-"+$_debug_name+"- @error @serror"? ELSE ?"- 37-"+@time+"-"+$_debug_name+"- @error @serror"? writelog("Not a member of 'Office Admin'") ?"- 38-"+@time+"-"+$_debug_name+"- @error @serror"? ENDIF ?"- 39-"+@time+"-"+$_debug_name+"- @error @serror"? ?"- 40-"+@time+"-"+$_debug_name+"- @error @serror"? IF InGroup ("President") ?"- 41-"+@time+"-"+$_debug_name+"- @error @serror"? writelog("member of 'President'") ?"- 42-"+@time+"-"+$_debug_name+"- @error @serror"? mapdrive("J:", "josmith1", "Jo Smith & Associates\Jo Doc") ?"- 43-"+@time+"-"+$_debug_name+"- @error @serror"? mapdrive("M:", "josmith1", "Jo Smith & Associates\Accounting") ?"- 44-"+@time+"-"+$_debug_name+"- @error @serror"? ELSE ?"- 45-"+@time+"-"+$_debug_name+"- @error @serror"? writelog("Not a member of 'President'") ?"- 46-"+@time+"-"+$_debug_name+"- @error @serror"? ENDIF ?"- 47-"+@time+"-"+$_debug_name+"- @error @serror"? ?"- 48-"+@time+"-"+$_debug_name+"- @error @serror"? ;------------------------------------------------------------------------------------------- ?"- 49-"+@time+"-"+$_debug_name+"- @error @serror"? ?"- 50-"+@time+"-"+$_debug_name+"- @error @serror"? FUNCTION mapdrive($drive, $server, $share) ?"- 51-"+@time+"-"+$_debug_name+"- @error @serror"? DIM $drive, $server, $share ?"- 52-"+@time+"-"+$_debug_name+"- @error @serror"? COLOR c+/n ?"- 53-"+@time+"-"+$_debug_name+"- @error @serror"? IF $drive<>"" AND $server<>"" AND $share<>"" ?"- 54-"+@time+"-"+$_debug_name+"- @error @serror"? $logtext="Connecting $Drive to \\$Server\$Share" ?"- 55-"+@time+"-"+$_debug_name+"- @error @serror"? ? $logtext ?"- 56-"+@time+"-"+$_debug_name+"- @error @serror"? USE $drive /delete /persistent ?"- 57-"+@time+"-"+$_debug_name+"- @error @serror"? USE $drive "\\$Server\$Share" ?"- 58-"+@time+"-"+$_debug_name+"- @error @serror"? IF @error=0 ?"- 59-"+@time+"-"+$_debug_name+"- @error @serror"? COLOR g+/n ?"- 60-"+@time+"-"+$_debug_name+"- @error @serror"? $x=" - Success" ?"- 61-"+@time+"-"+$_debug_name+"- @error @serror"? "$x" ?"- 62-"+@time+"-"+$_debug_name+"- @error @serror"? ELSE ?"- 63-"+@time+"-"+$_debug_name+"- @error @serror"? COLOR r+/n ?"- 64-"+@time+"-"+$_debug_name+"- @error @serror"? $x=" - Failed: Error @error" ?"- 65-"+@time+"-"+$_debug_name+"- @error @serror"? "$x" ?"- 66-"+@time+"-"+$_debug_name+"- @error @serror"? $errorstate=1 ?"- 67-"+@time+"-"+$_debug_name+"- @error @serror"? ENDIF ?"- 68-"+@time+"-"+$_debug_name+"- @error @serror"? writelog ($logtext + $x) ?"- 69-"+@time+"-"+$_debug_name+"- @error @serror"? COLOR w+/n ?"- 70-"+@time+"-"+$_debug_name+"- @error @serror"? ELSE ?"- 71-"+@time+"-"+$_debug_name+"- @error @serror"? writelog ("Function 'MapDrive' called with invalid parameters: '$Drive', '$Server', '$Share'") ?"- 72-"+@time+"-"+$_debug_name+"- @error @serror"? ENDIF ?"- 73-"+@time+"-"+$_debug_name+"- @error @serror"? ENDFUNCTION ?"- 74-"+@time+"-"+$_debug_name+"- @error @serror"? ?"- 75-"+@time+"-"+$_debug_name+"- @error @serror"? FUNCTION writelog($text) ?"- 76-"+@time+"-"+$_debug_name+"- @error @serror"? DIM $rc, $text, $logfile, $filehandle ?"- 77-"+@time+"-"+$_debug_name+"- @error @serror"? $filehandle = 1 ?"- 78-"+@time+"-"+$_debug_name+"- @error @serror"? $logfile = "%temp%\logon.log" ?"- 79-"+@time+"-"+$_debug_name+"- @error @serror"? $rc=WriteLine ($filehandle, "@Date @Time - $Text" + Chr(13) + Chr(10)) ?"- 80-"+@time+"-"+$_debug_name+"- @error @serror"? IF $rc<0 ?"- 81-"+@time+"-"+$_debug_name+"- @error @serror"? $rc=Close ($filehandle) ?"- 82-"+@time+"-"+$_debug_name+"- @error @serror"? $rc=Open ($filehandle, $logfile, 5) ?"- 83-"+@time+"-"+$_debug_name+"- @error @serror"? SELECT ?"- 84-"+@time+"-"+$_debug_name+"- @error @serror"? CASE $rc=-1 ?"- 85-"+@time+"-"+$_debug_name+"- @error @serror"? $rc=MessageBox ("Invalid file name ($LogFile) specified for log file.","Logon Script Error",48) ?"- 86-"+@time+"-"+$_debug_name+"- @error @serror"? CASE $rc=0 ?"- 87-"+@time+"-"+$_debug_name+"- @error @serror"? writelog ($text) ?"- 88-"+@time+"-"+$_debug_name+"- @error @serror"? CASE $rc=>0 ?"- 89-"+@time+"-"+$_debug_name+"- @error @serror"? $rc=MessageBox ("Error($RC) while attempting to open log file ($LogFile).","Logon Script Error",48) ?"- 90-"+@time+"-"+$_debug_name+"- @error @serror"? ENDSELECT ?"- 91-"+@time+"-"+$_debug_name+"- @error @serror"? ENDIF ?"- 92-"+@time+"-"+$_debug_name+"- @error @serror"? ENDFUNCTION ?"- 93-"+@time+"-"+$_debug_name+"- @error @serror"?
?"------- end-"+@time+"-"+$_debug_name+"- @error @serror" ? "-" ? "-"+LCASE(@day)+" "+@date+" "+@time+"- kixtart "+@kix+"/4.00e script ending" IF (Val(substr(@kix,1,1)) >= 4) IF (len(@scriptname) <> 0) " ("+LCASE(@scriptname)+")" ENDIF ENDIF ? "-" IF RedirectOutput("CON") ENDIF COLOR C+/N ? ? "Informative KIX "+@kix+":"+" debug info see "+CHR(34)+$_debug_file+CHR(34) IF (Val(substr(@kix,1,1)) >= 4) IF (len(@scriptname) <> 0) " ("+LCASE(@scriptname)+")" ENDIF ENDIF IF RedirectOutput($_debug_file) ENDIF ;($begin) ; ; wed 26-feb-2003 03:34:13 (kix 4.20 vs 4.00e) ; ;Informative KIXSTRIP: no errors found (input=93 output=93 skip=0). ; ;Summary KIXSTRIP: block structures ; - do:until [0:0] ; - for|each:in|to:step|next [0|0:0|0:0|0] ; - function:endfunction [2:2] ; - if:else:endif [8:7:8] ; - select:case:endselect [1:3:1] ; - while:loop [0:0] ;Informative KIXSTRIP: 11 block_structures found. ;Informative KIXSTRIP: 2 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: 2 ENDFUNCTION ;Informative KIXSTRIP: 2 FUNCTION ;Informative KIXSTRIP: 2 USE ; ;($end)
greetings.
|
|
Top
|
|
|
|
Moderator: Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 1205 anonymous users online.
|
|
|