Well for starters....REM is not a kix command. If you want remark a line out, simply add a semi-colon in front of it. Other than that, are you sure you have rights to create a file in the root of C:\. Try the below and see if it creates the file.

 Code:
$odbcName = "tess_live_readonly"	; SET THIS TO THE NAME OF THE ODBC YOU WANT TO CHECK FOR
$logfile = "C:\ODBC_LOG.txt"		; SET THIS TO THE PATH OF THE LOG FILE YOU WOULD TO WRITE TO
; $logfile = "\\fileserver\goldshare\ODBC_LOG.txt" ; SET THIS TO THE PATH OF THE LOG FILE YOU WOULD TO WRITE TO

If KeyExist("HKCU\Software\ODBC\ODBC.INI\" + $odbcName) Or KeyExist("HKLM\Software\ODBC\ODBC.INI\" + $odbcName)
   $nul = RedirectOutput($logfile)
   @Date+" - "+@Time+" - "+$odbcname+" Found on "+@WkSta+" under user "+@UserID ?
   $nul = RedirectOutput("")
Else
   $nul = RedirectOutput($logfile)
   @Date+" - "+@Time+" - "+$odbcname+" NOT Found on "+@WkSta+" under user "+@UserID ?
   $nul = RedirectOutput("")
Endif


When I simply change the REM to a semi-colon and changed the odbc name to check for.it seemed to work just fine for me.


Edited by ShaneEP (2013-03-08 10:06 PM)