Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Microsoft Auto Code Review (OACR) is enabled by default when you open a WDK Build environment window. You can enable or disable OACR by changing the global setting in the setenv.bat file or by changing settings on a per project basis in the OACR configuration files, OACR.ini or oacruser.ini.
To suspend the checking of files temporarily, click the Snooze option from the OACR Monitor shortcut menu. Checking is resumed after one hour.
Changing the Global Setting to Enable or Disable OACR
When you open one of the WDK build environments, a batch file named Setenv.bat executes in this window. This batch file sets the environment variables to their default values for this environment. The variable _RunOacr controls the global setting for OACR. To control the global variable, specify the oacr or no_oacr option and pass this to Setenv.bat.
To disable OACR (Global Setting)
From the Start menu, right-click the WDK build environment that you want to use and click Properties.
Click the Shortcut tab and add the no_oacr option to the Target command for the build environment. For example, for the Windows 7 x86 Free Build Environment, you might use the following command to disable OACR:
C:\Windows\System32\cmd.exe /k C:\WinDDK\version\bin\setenv.bat C:\WinDDK\ fre x86 WIN7 no_oacr
To enable OACR (Global Setting)
From the Start menu, right-click the WDK build environment you want to use and select Properties.
Click the Shortcut tab and add the oacr option to the Target command for the build environment. For example, for the Windows 7 x86 Free Build Environment, you might use the following target command to enable OACR:
C:\Windows\System32\cmd.exe /k C:\WinDDK\version\bin\setenv.bat C:\WinDDK\ fre x86 WIN7 oacr
Changing the Project Settings to Enable or Disable OACR
The OACR configuration is described in the Oacr.ini file. This file controls the project settings. The variable OACR controls whether Microsoft Auto Code Review is enabled or disabled for the by default.
The location of the Oacr.ini file is in the WinDDK\version\bin\arch\OACR directory. This file controls the settings for all the build environment windows.
To disable OACR
Open the Oacr.ini file. Change the OACR variable as follows. To disable OACR all projects by default, change the master setting in the [defaults] section for all project defaults.
;============================================================================= ; Project defaults ;============================================================================= [defaults] OACR=0 DefaultFlavor=x86 Priority=normal Platform=x86To disable OACR for a specific project, add the OACR=0 setting to the project setting.
;============================================================================= ; My Project ;============================================================================= [MyProject] OACR=0
To enable OACR
Open the Oacr.ini file. Change the OACR variable as follows. To enable OACR on all projects by default, change the master setting in the [defaults] section for all project defaults.
;============================================================================= ; Project defaults ;============================================================================= [defaults] OACR=1 DefaultFlavor=x86 Priority=normal Platform=x86To enable OACR for a specific project, add the OACR=1 setting to the project configuration.
;============================================================================= ; My Project ;============================================================================= [MyProject] OACR=1
Send comments about this topic to Microsoft
Build date: 5/3/2011