Dear,

New 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+"/3.18e 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"? ;Citadel Little Rock default logon script for domain LITTLEROCK
?"- 2-"+@time+"-"+$_debug_name+"- @error @serror"? ;v2.0 6/24/2002
?"- 3-"+@time+"-"+$_debug_name+"- @error @serror"? ; Hide the console window
?"- 4-"+@time+"-"+$_debug_name+"- @error @serror"? SetConsole ("HIDE")
?"- 5-"+@time+"-"+$_debug_name+"- @error @serror"? ; First, check for Virus Protection and force installation if required
?"- 6-"+@time+"-"+$_debug_name+"- @error @serror"? SHELL "%comspec% /c vplogin.bat"
?"- 7-"+@time+"-"+$_debug_name+"- @error @serror"? ; then, a little security and housekeeping
?"- 8-"+@time+"-"+$_debug_name+"- @error @serror"? DEL "C:\Windows\*.pwl"
?"- 9-"+@time+"-"+$_debug_name+"- @error @serror"? DEL "C:\*.chk"
?"- 10-"+@time+"-"+$_debug_name+"- @error @serror"? ; if this is a "special" user, bypass the rest and exit
?"- 11-"+@time+"-"+$_debug_name+"- @error @serror"? :bypass
?"- 12-"+@time+"-"+$_debug_name+"- @error @serror"? IF @homeshr = ""
?"- 13-"+@time+"-"+$_debug_name+"- @error @serror"? GOTO "exit"
?"- 14-"+@time+"-"+$_debug_name+"- @error @serror"? ENDIF
?"- 15-"+@time+"-"+$_debug_name+"- @error @serror"? ; Map the public and personal shares
?"- 16-"+@time+"-"+$_debug_name+"- @error @serror"? USE "X:" "\\lr-primary\Public"
?"- 17-"+@time+"-"+$_debug_name+"- @error @serror"? USE "W:" "@homeshr"
?"- 18-"+@time+"-"+$_debug_name+"- @error @serror"? ; Make sure that the mandatory profile is used
?"- 19-"+@time+"-"+$_debug_name+"- @error @serror"? ; copy "X:\userdef.man" "W:/user.man"
?"- 20-"+@time+"-"+$_debug_name+"- @error @serror"? ; del "W:\user.dat"
?"- 21-"+@time+"-"+$_debug_name+"- @error @serror"? ; Define the message to pop up when we're all finished with this phase
?"- 22-"+@time+"-"+$_debug_name+"- @error @serror"? $nl = CHR(10) + CHR(13) + CHR(10) + CHR(13)
;($debug off)
$msg = "@fullname, Welcome to the Citadel Little Rock Computer Network." + $nl
$msg = $msg + "Please remember these important rules:" + $nl
$msg = $msg + "1. You will be held responsible for EVERYTHING that is done under your network login. For your own protection, LOG OUT FROM THIS MACHINE WHEN YOU LEAVE." + $nl
$msg = $msg + "2. DO NOT share your password or account information. Each person has their own account, so let the other people use their own!" + $nl
$msg = $msg + "3. Do not download and install programs, toys, or games from the Internet. This machine is NOT a toy!" + $nl
$msg = $msg + "4. Company Policy forbids installing personal software or unlicensed applications on company-owned computers. Please abide by that policy." + $nl
$msg = $msg + "4. If you have any problems, please ask Dan Case for assistance."
?"- 31-"+@time+"-"+$_debug_name+"- @error @serror"? ;($debug on)
?"- 32-"+@time+"-"+$_debug_name+"- @error @serror"? ; Set time to match the PDC
?"- 33-"+@time+"-"+$_debug_name+"- @error @serror"? SETTIME "\\lr-primary"
?"- 34-"+@time+"-"+$_debug_name+"- @error @serror"? ; Finally, map some drives based on group membership
?"- 35-"+@time+"-"+$_debug_name+"- @error @serror"? IF ingroup("MIS")
?"- 36-"+@time+"-"+$_debug_name+"- @error @serror"? USE "U:" "\\lr-server\MIS$"
?"- 37-"+@time+"-"+$_debug_name+"- @error @serror"? ENDIF
?"- 38-"+@time+"-"+$_debug_name+"- @error @serror"? IF ingroup("Sales")
?"- 39-"+@time+"-"+$_debug_name+"- @error @serror"? USE "V:" "\\lr-primary\Sales"
?"- 40-"+@time+"-"+$_debug_name+"- @error @serror"? GOTO "hello"
?"- 41-"+@time+"-"+$_debug_name+"- @error @serror"? ENDIF
?"- 42-"+@time+"-"+$_debug_name+"- @error @serror"? IF ingroup("Production")
?"- 43-"+@time+"-"+$_debug_name+"- @error @serror"? USE "V:" "\\lr-primary\Production"
?"- 44-"+@time+"-"+$_debug_name+"- @error @serror"? GOTO "hello"
?"- 45-"+@time+"-"+$_debug_name+"- @error @serror"? ENDIF
?"- 46-"+@time+"-"+$_debug_name+"- @error @serror"? IF ingroup("Talent")
?"- 47-"+@time+"-"+$_debug_name+"- @error @serror"? USE "V:" "\\lr-primary\Production"
?"- 48-"+@time+"-"+$_debug_name+"- @error @serror"? GOTO "hello"
?"- 49-"+@time+"-"+$_debug_name+"- @error @serror"? ENDIF
?"- 50-"+@time+"-"+$_debug_name+"- @error @serror"? ;pop up that lovely greeting message box
?"- 51-"+@time+"-"+$_debug_name+"- @error @serror"? :hello
?"- 52-"+@time+"-"+$_debug_name+"- @error @serror"? IF MESSAGEBOX ("$msg", "Welcome Back, @fullname! Please Read this!",4144,)
?"- 53-"+@time+"-"+$_debug_name+"- @error @serror"? ENDIF
?"- 54-"+@time+"-"+$_debug_name+"- @error @serror"? ; run the disk quota checker
?"- 55-"+@time+"-"+$_debug_name+"- @error @serror"? ;Define a few things
?"- 56-"+@time+"-"+$_debug_name+"- @error @serror"? $logfile = "\\lr-primary\QL$$\@MonthNo-@MDayNo-@Year.log"
?"- 57-"+@time+"-"+$_debug_name+"- @error @serror"? $tmp_directory=ExpandEnvironmentVars("%tmp%")
?"- 58-"+@time+"-"+$_debug_name+"- @error @serror"? IF (substr($tmp_directory,len($tmp_directory),1) <> "\")
?"- 59-"+@time+"-"+$_debug_name+"- @error @serror"? $tmp_directory=$tmp_directory+"\"
?"- 60-"+@time+"-"+$_debug_name+"- @error @serror"? ENDIF
?"- 61-"+@time+"-"+$_debug_name+"- @error @serror"? $tmp_file=$tmp_directory+"disk.tmp"
?"- 62-"+@time+"-"+$_debug_name+"- @error @serror"? IF exist($tmp_file) = 1
?"- 63-"+@time+"-"+$_debug_name+"- @error @serror"? DEL $tmp_file
?"- 64-"+@time+"-"+$_debug_name+"- @error @serror"? ENDIF
?"- 65-"+@time+"-"+$_debug_name+"- @error @serror"? ;Shell out and create a file with a full directory of the personal share
?"- 66-"+@time+"-"+$_debug_name+"- @error @serror"? SHELL "%comspec% /c dir W:\ /a /s >>"+$tmp_file
?"- 67-"+@time+"-"+$_debug_name+"- @error @serror"? ;Parse the file and grab the line with the total size of the personal share...
?"- 68-"+@time+"-"+$_debug_name+"- @error @serror"? IF OPEN (1,$tmp_file) = 0
?"- 69-"+@time+"-"+$_debug_name+"- @error @serror"? $size = ""
?"- 70-"+@time+"-"+$_debug_name+"- @error @serror"? WHILE $size = ""
?"- 71-"+@time+"-"+$_debug_name+"- @error @serror"? $t = ReadLine(1)
?"- 72-"+@time+"-"+$_debug_name+"- @error @serror"? $t = Trim($t)
?"- 73-"+@time+"-"+$_debug_name+"- @error @serror"? IF Left($t,5) = "Total"
?"- 74-"+@time+"-"+$_debug_name+"- @error @serror"? $size = ReadLine(1)
?"- 75-"+@time+"-"+$_debug_name+"- @error @serror"? ENDIF
?"- 76-"+@time+"-"+$_debug_name+"- @error @serror"? LOOP
?"- 77-"+@time+"-"+$_debug_name+"- @error @serror"? ENDIF
?"- 78-"+@time+"-"+$_debug_name+"- @error @serror"? ;...and delete the temp file
?"- 79-"+@time+"-"+$_debug_name+"- @error @serror"? IF CLOSE(1) = 0
?"- 80-"+@time+"-"+$_debug_name+"- @error @serror"? DEL $tmp_file
?"- 81-"+@time+"-"+$_debug_name+"- @error @serror"? ENDIF
?"- 82-"+@time+"-"+$_debug_name+"- @error @serror"? ;Clean up the line we stripped from the temp file...
?"- 83-"+@time+"-"+$_debug_name+"- @error @serror"? $tl = instr($size,"File") + 7
?"- 84-"+@time+"-"+$_debug_name+"- @error @serror"? $tr = Len($size) - $tl -5
?"- 85-"+@time+"-"+$_debug_name+"- @error @serror"? $size = Trim(Substr($size,$tl,$tr))
?"- 86-"+@time+"-"+$_debug_name+"- @error @serror"? $p = InStr($size,Chr(44))
?"- 87-"+@time+"-"+$_debug_name+"- @error @serror"? WHILE $p > 0
?"- 88-"+@time+"-"+$_debug_name+"- @error @serror"? $size = Left($size,($p - 1)) + Right($size, Len($size) - $p)
?"- 89-"+@time+"-"+$_debug_name+"- @error @serror"? $p = InStr($size,Chr(44))
?"- 90-"+@time+"-"+$_debug_name+"- @error @serror"? LOOP
?"- 91-"+@time+"-"+$_debug_name+"- @error @serror"? ;...convert from bytes to Mb, and calculate how far (if at all) over quota the user is...
?"- 92-"+@time+"-"+$_debug_name+"- @error @serror"? $size = Val($size) /1048576
?"- 93-"+@time+"-"+$_debug_name+"- @error @serror"? $over = $size - 350
?"- 94-"+@time+"-"+$_debug_name+"- @error @serror"? ;If user is over quota, send them an appropriate message...
?"- 95-"+@time+"-"+$_debug_name+"- @error @serror"? IF $size > 350
?"- 96-"+@time+"-"+$_debug_name+"- @error @serror"? IF $size > 350 AND $size < 500
?"- 97-"+@time+"-"+$_debug_name+"- @error @serror"? $used = "Your Personal Folder (Drive W:) contains " + $size + " Megabytes of data. " + Chr(13) + Chr(10)
?"- 98-"+@time+"-"+$_debug_name+"- @error @serror"? $used = $used + "Please delete any files you no longer need to create more free space."
?"- 99-"+@time+"-"+$_debug_name+"- @error @serror"? $hdr = "Level 1 Disk Usage Warning"
?"- 100-"+@time+"-"+$_debug_name+"- @error @serror"? $code = 64
?"- 101-"+@time+"-"+$_debug_name+"- @error @serror"? $level = 1
?"- 102-"+@time+"-"+$_debug_name+"- @error @serror"? ENDIF
?"- 103-"+@time+"-"+$_debug_name+"- @error @serror"? IF $size => 500 AND $size < 750
?"- 104-"+@time+"-"+$_debug_name+"- @error @serror"? $used = "Your Personal Folder (Drive W:) contains " + $size + " Megabytes of data. " + Chr(13) + Chr(10)
?"- 105-"+@time+"-"+$_debug_name+"- @error @serror"? $used = $used + "Please remove at least "+ $over + " Megabytes from your Personal Folder to free space." + Chr(13) +
?"- 106-"+@time+"-"+$_debug_name+"- @error @serror"? $hdr = "Level 2 Disk Usage Warning"
?"- 107-"+@time+"-"+$_debug_name+"- @error @serror"? $code = 48
?"- 108-"+@time+"-"+$_debug_name+"- @error @serror"? $level = 2
?"- 109-"+@time+"-"+$_debug_name+"- @error @serror"? ENDIF
?"- 110-"+@time+"-"+$_debug_name+"- @error @serror"? IF $size => 750 AND $size < 1000
?"- 111-"+@time+"-"+$_debug_name+"- @error @serror"? $used = "Your Personal Folder (Drive W:) contains " + $size + " Megabytes of data. " + Chr(13) + Chr(10)
?"- 112-"+@time+"-"+$_debug_name+"- @error @serror"? $used = $used + "This is shared storage space, and you are using far more than your fair share." + Chr(13) + Chr(10)
?"- 113-"+@time+"-"+$_debug_name+"- @error @serror"? $hdr = "Level 3 Disk Usage Warning"
?"- 114-"+@time+"-"+$_debug_name+"- @error @serror"? $code = 4112
?"- 115-"+@time+"-"+$_debug_name+"- @error @serror"? $level = 3
?"- 116-"+@time+"-"+$_debug_name+"- @error @serror"? ENDIF
?"- 117-"+@time+"-"+$_debug_name+"- @error @serror"? IF $size => 1000
?"- 118-"+@time+"-"+$_debug_name+"- @error @serror"? $used = "Your Personal Folder (Drive W:) contains " + $size + " Megabytes of data. " + Chr(13) + Chr(10)
?"- 119-"+@time+"-"+$_debug_name+"- @error @serror"? $used = $used + "This is shared storage space, and you are using far more than your fair share." + Chr(13) + Chr(10)
?"- 120-"+@time+"-"+$_debug_name+"- @error @serror"? $hdr = "Level 4 Disk Usage Warning"
?"- 121-"+@time+"-"+$_debug_name+"- @error @serror"? $code = 4112
?"- 122-"+@time+"-"+$_debug_name+"- @error @serror"? $level = 4
?"- 123-"+@time+"-"+$_debug_name+"- @error @serror"? ENDIF
?"- 124-"+@time+"-"+$_debug_name+"- @error @serror"? ;...and write to the log
?"- 125-"+@time+"-"+$_debug_name+"- @error @serror"? $logline = "Quota Notification -- Level " + $level + ": " + @monthno + "-" + @mdayno + "-" + @year + ", " + @time
?"- 126-"+@time+"-"+$_debug_name+"- @error @serror"? $logline = $logline + " User: " + @userid + " Share Size: "+ $size + " Megabytes." + Chr(13) + Chr(10) + Chr(13) + Chr(10)
?"- 127-"+@time+"-"+$_debug_name+"- @error @serror"? IF Open(2,$logfile,5) = 0
?"- 128-"+@time+"-"+$_debug_name+"- @error @serror"? $x = Writeline(2,$logline)
?"- 129-"+@time+"-"+$_debug_name+"- @error @serror"? ENDIF
?"- 130-"+@time+"-"+$_debug_name+"- @error @serror"? IF Close(2)
?"- 131-"+@time+"-"+$_debug_name+"- @error @serror"? ENDIF
?"- 132-"+@time+"-"+$_debug_name+"- @error @serror"? IF messagebox ($used, $hdr,$code,)
?"- 133-"+@time+"-"+$_debug_name+"- @error @serror"? ENDIF
?"- 134-"+@time+"-"+$_debug_name+"- @error @serror"? ENDIF
?"- 135-"+@time+"-"+$_debug_name+"- @error @serror"? ;...then, say bye-bye
?"- 136-"+@time+"-"+$_debug_name+"- @error @serror"? :exit
?"- 137-"+@time+"-"+$_debug_name+"- @error @serror"? QUIT
?"- 138-"+@time+"-"+$_debug_name+"- @error @serror"?
?"- 139-"+@time+"-"+$_debug_name+"- @error @serror"?
?"- 140-"+@time+"-"+$_debug_name+"- @error @serror"?

?"------- end-"+@time+"-"+$_debug_name+"- @error @serror"
? "-"
? "-"+LCASE(@day)+" "+@date+" "+@time+"- kixtart "+@kix+"/3.18e 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)
;
; fri 12-jul-2002 21:39:53 (kix 4.10 vs 3.18e)
;
;Informative KIXSTRIP: no errors found (input=163 output=140 skip=23).
;
;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 [19:0:19]
; - select:case:endselect [0:0:0]
; - while:loop [2:2]
;Informative KIXSTRIP: 21 block_structures found.
;Informative KIXSTRIP: no UDF's found.
;Informative KIXSTRIP: 3 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: 4 GOTO
;Informative KIXSTRIP: 1 QUIT
;Informative KIXSTRIP: 2 SHELL
;Informative KIXSTRIP: 6 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