How to enable and disable Scheduled Tracing for Microsoft Dynamics CRM
This article introduces how to enable and disable Scheduled Tracing for Microsoft Dynamics CRM.
Applies to: Microsoft Dynamics CRM 2011
Original KB number: 2862025
How to enable scheduled tracing
Set up the trace. When you set up the trace, enter all the required values. However, leave the TraceEnabled registry entry set to 0.
Create a registry file that enables the trace. To do this, start Notepad, copy the following information to the document in Notepad, and then save the document as a .reg file:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSCRM] "TraceEnabled"=dword:00000001
Create a batch file that calls the .reg file. To do this, open a new document in Notepad, and then copy the following lines to the document in Notepad.
Note
In the lines that you copy, replace the <C:\Enable.reg> placeholder with the path and the file name of the actual .reg file that you created in step 2.
@echo off regedit /s "<C:\Enable.reg>" exit
In Control Panel, add a new scheduled task that runs the new batch file that you created in step 3. Schedule the task for the time at which you want the trace to run.
How to disable scheduled tracing
Create a registry file that disables the trace. To do this, start Notepad, copy the following information to the document in Notepad, and then save the document as a .reg file:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSCRM] "TraceEnabled"=dword:00000000 "TraceRefresh"=dword:00000003
Note
You must change the value of the
TraceRefresh
registry entry. If you do not change the value of theTraceRefresh
registry entry, the trace will not be disabled.Create a batch file that calls the .reg file. To do this, open a new document in Notepad, and then copy the following lines to the document in Notepad.
Note
In the lines that you copy, replace the <C:\Disable.reg> placeholder with the path and the file name of the actual .reg file that you created in step 2.
@echo off regedit /s "<C:\disable.reg>" exit
In Control Panel, add a new scheduled task that runs the new batch file that you created in step 3. Schedule the task for the time at which you want the trace to be disabled.