On_Jon ** 3/10/2000 **

Here are several examples of redirects that work.

;;=========================================

$LogLoc="\\WGC-AUB-03\logs$\dchk\" ;share open to all RWX
;$LogLoc="%TEMP%\" ;in case the above is not set
$LogFile="D_Log.txt" ; log file name and extension

$ShoDate="@monthno/@mdayno/@year" ; for showing date in mm/dd/yyyy format ; KIX @Date
;;=========================================

;
; ----------- Check OS -------------
; check OS note: Win2K @Dos returns 5.0 Win98 4.10 and both Win95 and NTW 4.0 are 4.0.
$OSVer = @DOS
if $OSVer = ""
$OSVer = "OSVerND"
endif
$OS = "Windows NT"
if @INWIN = 2
$OS = "Win9x $OSVer"
else
$OS = "WinNT $OSVer"
endif

;
;------------ For setting test mode --------------

$dmp=""
if exist("%temp%\chkdmp")=1
$dmp=1 ; $dmp=1 means were in debug dump test mode
color w+/r
? " Running script in debug dump mode "
? " Dumping to temp\chklog.txt"
sleep 02
else
color y+/b
endif
? ""

;================== For test /debugging mode - dumps to temp\chklog.txt
if $dmp="1"
$t= RedirectOutput(%TEMP%\chklog.txt , 0 )
? ""
? "OS and version is $OS"
? "NetID is $PC_ID"
? "Log file is set to $LogFile"
? "Log location is $LogLoc"

? "System date $ShoDate at @Time"
? ""
$y=RedirectOutput("")
endif
;==================

;
;------------ Log out --------------
;
:SENDLOG
$L= RedirectOutput( "$LogLoc$LogFile" , 0 )
? "D_Check," + "@USERID,@FULLNAME,@PRIV,$OS,$ShoDate @TIME,"
sleep 01
$y=RedirectOutput("")
? ""
endif

;;=========================================