WS SDK Professional Edition Development Utilities

« Back to SDK Product page


The mofinclude utility generates a MOF file containing #pragrma include statements to other MOF files in a schema.

Run mofinclude from the following directory

Platform Directory
Windows C:\Program Files\ws\sdk\bin\
Linux /usr/ws/sdk/bin
Solaris /opt/ws/sdk/bin

Command Line Syntax

The mofinclude utility can be invoked by typing mofinclude at the command prompt.

The command line syntax for the mofinclude utility is included below.

C:> cd \Program Files\ws\sdk\bin
C:> mofinclude -h
MOFInclude [options] dir out
Copyright (c) 2007 WBEM Solutions, Inc.
-h Display this usage statement
-v Display the version information
-cf Copyright File
-l locale pragma
-qf Qualifier Include Files
dir Directory
out Output File
mofinclude -cf my.copyright -l en_US -qf qualifiers.mof,qualifiers_optional.mof . cim.mof


  • The contents of the Copyright File specified by the -cf option are inserted at the beginning of the generated file.
  • The -l argument is used to generate #pragma locale statement; e.g. #program locale (“en_US”).
  • The -qf argument list is used to generate #pragma include statements for the qualifiers to be used. For example, -qf qualifiers.mof generates #pragma include (“qualifiers.mof”).
  • mofinclude examines every file in the specified directory that has a .mof extension, including all subdirectories.
  • mofinclude generates an output file containing a list of #pragma include statements. The list is properly ordered so that it can be used to compile the set of MOF files it has examined.


Creating a MOF include

-cf copyright.txt Copyright file to use
-l en_US The #pragma locale to use
-qf qualifiers.mof,qualifiers_optional.mof The #pragma include qualifier statements to use
..\..\standards\dmtf\schema\2.24.1\final\cim_schema_2.24.1Final-MOFs\ The top level directory containing the MOF file
cim_schema_2.24.1.mof The output file to generate


mofinclude -cf copyright.txt -l en_US -qf qualifiers.mof,qualifers_optional.mof
..\..\standards\dmtf\schema\2.24.1\final\cim_schema_2.24.1Final-mofs\ cim_schema_2.24.1.mof

mofinclude screenshot

Back to Top

For more information about the the WBEM Solutions products please contact sales.