WS SDK Professional Edition Development Utilities

« Back to SDK Product page


The schemadiff utility compares two schemas and generates a report describing the differences between the two. For developers, this utility can be useful in identifying the changes made to the previous version of MOF files.

Run schemadiff 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 schemadiff utility can be invoked by typing schemadiff at the command prompt.

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

C:\>cd \Program Files\ws\sdk\bin C:\Program Files\ws\sdk\bin>schemadiff -h
SchemaDiff [options] SCHEMA1 SCHEMA2
Copyright (c) 2002-2010 WBEM Solutions, Inc.
Use is Subject to License Terms.
-h Display this usage statement
-o <dir> Directory to output files
-q Quiet mode
-v Display the version information
SCHEMA1 The schema to be compared against
SCHEMA2 The schema to compare
schemadiff schema/2.22.1/final/cim_schema_2.22.1.mof schema/2.23.0/final/cim_s chema_2.23.0.mof
schemadiff schema/2.23.0/final/cim_schema_2.23.0.mof.mof schema/2.23.0/experim ental/cim_schema_2.23.0.mof
C:\Program Files\ws\sdk\bin>

Default Values

The following table shows the default values for each of the option arguments. If an option is not listed, then it has no default value.

Option Description Default
-h Display this usage statement FALSE
-o <dir> Directory to output files <current directory>
-q Quiet mode FALSE
-v Display the version information FALSE


The following command generates a report describing the differences between the older 2.23 schema and the new 2.24 schema.


-o diff <Output directory>
..\..\standards\dmtf\schema\2.22.1\final\cim_schema_2.22.1.mof <Old Schema>
..\..\standards\dmtf\schema\2.23.0\final\cim_schema_2.23.0.mof <NewSchema>

The following shows the command and the result.

C:\>cd \Program Files\ws\standards\dmtf\schema\2.23.0\final
C:\Program Files\ws\standards\dmtf\schema\2.23.0\final>unzip
inflating: User/CIM_VerificationService.mof
inflating: cim_schema_2.23.0.mof
inflating: qualifiers.mof
inflating: qualifiers_optional.mof
C:\>cd \Program Files\ws\standards\dmtf\schema\2.24.1\final
C:\Program Files\ws\standards\dmtf\schema\2.24.1\final>unzip
inflating: User/CIM_VerificationService.mof
inflating: cim_schema_2.24.1.mof
inflating: qualifiers.mof
inflating: qualifiers_optional.mof
C:\>cd \Program Files\ws\sdk\bin
C:\Program Files\ws\sdk\bin>mkdir diff
C:\Program Files\ws\sdk\bin>schemadiff -o diff ..\..\standards\dmtf\schema\2.23.0\final\cim_schema_2.23.0.mof ..\..\standards\dmtf\schema\2.24.1\final\cim_schem a_2.24.1.mof
Processing CIM_CASignsPublicKeyCertificate
SchemaDiff completed successfully.
Open index.html to view the report.
C:\Program Files\ws\sdk\bin>cd diff
C:\Program Files\ws\sdk\bin\diff>dir /b *.html
C:\Program Files\ws\sdk\bin\diff>

schemadiff generates an HTML file for each class in the new schema and an index.html file that references all of the other HTML files. All of these files are generated in the diff subdirectory.

NOTE: If the -o option were not used, then all files are created in the current directory, which in the example above would have been \Program files\ws\sdk\bin

If you scroll down the Summary pane, you will see a table listing the modified and new classes.

schemadiff screenshot 1

Clicking on any link for a particular class will show its class information. The format is identical to the format generated by mofmorph. For example, clicking on the CIM_ComputerSystem link shows

schemadiff screenshot 2

Back to Top

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