Page 2 of 2 <12
Topic Options
#73661 - 2003-02-25 10:11 PM Re: Logon script for multi groups
anwar Offline
Fresh Scripter

Registered: 2003-02-25
Posts: 17
Loc: texas
I ran the test script you posted in DOS and I can not find the Logon.log. I did a search and found nothing.
Top
#73662 - 2003-02-25 10:13 PM Re: Logon script for multi groups
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
try 'notepad %temp%\logon.log'
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#73663 - 2003-02-25 10:22 PM Re: Logon script for multi groups
anwar Offline
Fresh Scripter

Registered: 2003-02-25
Posts: 17
Loc: texas
I can't find that file
Top
#73664 - 2003-02-25 10:24 PM Re: Logon script for multi groups
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
As I stated earlier how do you know that your script is actually running? Everything you've said so far indicates to me that you don't really run the script.

Maybe it's now time to really do what I suggested and start with some small stuff likethe 'Hello' script.
_________________________
There are two types of vessels, submarines and targets.

Top
#73665 - 2003-02-25 10:28 PM Re: Logon script for multi groups
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
What OS are did you run the test script on? If W2K or XP the temp directory can not be found using the search function.

Did you see drives getting mapped?

Remove the "Exit" from the script so that the window does not close. Re-run the script. Does the script complete successfully or is error text displayed in the DOS window? If there is any text post it.

Open another DOS window. Execute: 'cd %temp%' then execute 'dir logon.log'. Do you see it now?

[ 25. February 2003, 22:29: Message edited by: Howard Bullock ]
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#73666 - 2003-02-25 10:36 PM Re: Logon script for multi groups
anwar Offline
Fresh Scripter

Registered: 2003-02-25
Posts: 17
Loc: texas
There are not exit commands in the code. I ran the test on both XP and 2000. I search both XP and 2000 and did not find the file. Maybe I am doing it wrong? I go into dos go to the loction where I saved the test script and type the command KIX32 Test.kix. It runs then the dos window close and beep.
Top
#73667 - 2003-02-25 10:41 PM Re: Logon script for multi groups
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Remove the first line:

SetConsole ("HIDE")

Try also to run it as KIX32 test.kix /d
and single step through the code. You may have fat fingered something in the code.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#73668 - 2003-02-25 10:42 PM Re: Logon script for multi groups
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Are doing this from the command prompt in a DOS window or are you doing "start run".

This is basic troubleshooting. The window should not close unless you have and "exit" in the code or are not running from the command prompt in an open DOS window.

Is the script properly formatted? Can you read it and is properly constructed when you open the test.kix file in notepad?

The beep would potentially signify a script error.

[ 25. February 2003, 22:43: Message edited by: Howard Bullock ]
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#73669 - 2003-02-25 10:45 PM Re: Logon script for multi groups
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Howard,
The line:
SetConsole ("HIDE")
would indeed make the console disappear. The beep however makes me think there is something fat fingered.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#73670 - 2003-02-25 10:47 PM Re: Logon script for multi groups
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Get rid of the hide console command. That was an oversight on my part. Thanks Les.
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#73671 - 2003-02-25 10:54 PM Re: Logon script for multi groups
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
At no point do I see any mention of what version of KiX is in use. For the test code to work, KiX 4.x is required.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#73672 - 2003-02-25 11:00 PM Re: Logon script for multi groups
anwar Offline
Fresh Scripter

Registered: 2003-02-25
Posts: 17
Loc: texas
I know my script is working because I can take
code:
SetConsole ("HIDE")

If INGROUP ("Office Staff")
USE P: /delete
USE P: "\\josmith1\Jo Smith & Associates\Public"
USE O: /delete
USE O: "\\josmith1\Jo Smith & Associates\OfficeStaff"
USE S: /delete
USE S: "\\josmith1\Jo Smith & Associates\ScanDocs"
USE N: /delete
USE N: "\\josmith1\Jo Smith & Associates\Temp Employees"
EndIF

and it will map the drive to all the computers if I put them in the Office staff group

Top
#73673 - 2003-02-25 11:02 PM Re: Logon script for multi groups
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
How do you know they are not persistent mappings?
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#73674 - 2003-02-25 11:03 PM Re: Logon script for multi groups
anwar Offline
Fresh Scripter

Registered: 2003-02-25
Posts: 17
Loc: texas
I ran a debug on the test script and received an error msg. say an unknow or unexcpeted command [writelog]! writelog ($logtext + $x)
Top
#73675 - 2003-02-25 11:05 PM Re: Logon script for multi groups
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
What version is your KiX?
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#73676 - 2003-02-25 11:05 PM Re: Logon script for multi groups
anwar Offline
Fresh Scripter

Registered: 2003-02-25
Posts: 17
Loc: texas
I delete the map connection and delet the kixtart key from the registry and make sure that no drive are being manually map and re-run the script and everytime they map
Top
#73677 - 2003-02-25 11:14 PM Re: Logon script for multi groups
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
You have a syntax error

EndfunctionFunction WriteLog($text)

needs to be

Endfunction

Function WriteLog($text)
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#73678 - 2003-02-25 11:18 PM Re: Logon script for multi groups
anwar Offline
Fresh Scripter

Registered: 2003-02-25
Posts: 17
Loc: texas
I am running the version Kixtart 4.0
Top
#73679 - 2003-02-26 03:56 AM Re: Logon script for multi groups
MCA Offline
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.
_________________________
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

Top
Page 2 of 2 <12


Moderator:  Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 774 anonymous users online.
Newest Members
batdk82, StuTheCoder, M_Moore, BeeEm, min_seow
17885 Registered Users

Generated in 0.073 seconds in which 0.029 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org