Code:
;Write entry to log files if an error occurs.

;Read current number of errors from ini log and add 1.
$errornumber = ReadProfileString($inilog, "Errors", "NumberOfErrors") + 1
;Write new number of errors to ini based log file.
$rc = WriteProfileString($inilog, "Errors", "NumberOfErrors", $errornumber)
;Write entry in the text based log file.
$rc = WriteLog($txtlog, @WKSTA + ". User ID: " + @USERID + ". IP address: " + @IPADDRESS0 + ". - ERROR: ERROR TEXT GOES HERE.", 1)


Mart. I'm trying to include this today and do some testing. I'm not using an ini file, but i am putting $rc in from of the use for the drives and the printer mappings. Since I'm not using the INI file how can I still get it to use the $rc to write to the log file?

Any idea's appreciated.