Trace.exe - turning off Logging


I used the supplied Trace.exe to turn on system wide tracing for MSSQL but now I want to turn it off I am having problems.

  1. I tried through Trace-exe and trying another apply with everything unticked after deleting the log file name and leaving that blank.
  2. I then deleted the entry in Drivers.ini. That remains deleted but even a recompile still writes the log.
  3. By adding SYSTEM{PROP:DriverTracing} = ‘’ at program start did work but if I recompile again with that line commented out, the tracing log returns.

Having a line to switch driver tracing off at the start of a program doesn’t seem a good way to solve this. Does anyone know how I can get this tracing switched off?

Thanks, Jim

Are you running Trace.exe elevated as Administrator?
It writes to the WIN.INI folder in \Windows and the program has to be elevated to update the file.


Many thanks for the reply,

I checked WIN.ini after your useful tip, but there was nothing there to force it through. Therefore I did a whole C: drive search and found another copy that was not in the folder opened from the IDE Menu, Tools->Open Configuration Directory but in the parent of that folder. I don’t know why it should have made two copies in different folders but this second one still had the entry. Getting rid of that sorted it out.

Many thanks though because your idea of another ini file set me thinking about the possibility and hence make the search.

Regards, Jim

Yeah, forgot about C10 using a different location and it isn’t in Win.INI anymore.

These days, its best to use code to turn driver logging on and off. win.ini and trace.exe dont seem to work so well for that anymore.

Code by Mark Goldberg

Profile:OutputDebugString EQUATE('Debug:')
   SYSTEM{Prop:Profile} = Profile:OutputDebugString

Suggestion by Mark Sarson: If you are using UltimateDebug:


FileName being the file you want to target for tracing

Suggestion by Mark Riffey:

SYSTEM{PROP:DriverTracing} = '1'  !enable all driver tracing
SYSTEM{PROP:Profile} = 'Debug:'   !Send output to debugview

Put a switch in the code to turn it on and off.

IF EXISTS(<public documents folder for user>\trace.txt) = TRUE
    < turn trace on >
1 Like