Microsoft KB Archive/245773

{|
 * width="100%"|

INFO: Recommended Methods for Compiling Managed Object Format (MOF) Files

 * }

Q245773

-

The information in this article applies to:


 * Windows Management Instrumentation, versions 1.0, 1.1

-

SUMMARY
Windows Management Instrumentation (WMI) provides the following three methods for compiling Managed Object Format (MOF) files into the WMI repository:


 * Method 1: Run the Mofcomp.exe file, specifying the MOF file as the command-line parameter.
 * Method2: Use the IMofCompiler interface and the CompileFile method.
 * Method 3: Drop the MOF file into the %SystemRoot%\System32\Wbem\MOF folder.

Microsoft recommends that you use the first two methods for compiling MOF files into the repository. That is, run the Mofcomp.exe file or use the IMofCompiler::CompileFile method.

The third method is provided only for backward-compatibility with earlier versions of WMI and should not be used because this functionality may not be provided in future releases.

MORE INFORMATION
The Mofcomp.exe file provides command-line help on the usage switches for options. See the Platform SDK Documentation section "MOF Compiler" under WMI references for more details.