The VBScript file Manifestchk.vbs is a validation tool provided in the Microsoft Windows Software Development Kit (SDK) that validates application and assembly manifest files.
Running this sample requires Windows Script Host. For more information about Windows Script Host, see the Windows Script Host section of the Windows SDK. Windows Script Host is actually two hosts. CScript.exe is the version that enables you to run scripts from the command prompt. CScript.exe provides command-line switches for setting script properties.
The command-line format is the following:
Cscript //nologo manifestchk.vbs /s: [drive:][path]schemafilename /m: [drive:][path]manifestfilename [/q] /t: option
The flags defined for Manifestchk.vbs are described in the following table.
|/s||Specifies the manifest schema file name to validate manifests against. See the schema at Manifest File Schema.|
|/m||Specifies the manifest file name to validate.|
|/q||Suppresses all output to the console.|
|/t||Specifies the type of manifest file. The valid values are:
AC – Validate the application configuration file schema of an application configuration file.
If the /q flag is not specified, Manifestchk.vbs displays detailed information about the first error encountered in the file, and displays a message stating whether the validation process was successful or not.
This utility checks for the following:
- A valid command line.
- That MSXML version 3 is installed.
- That the manifest uses well-formed XML.
- That the manifest agrees with the provided schema. Note that Manifestchk.vbs verifies the manifest file based only on what is specified in the provided schema. For an example of a manifest schema, see Manifest File Schema.
Cscript.exe returns a value of 0 if the validation process was successful and 1 if it was not successful. It returns 2 if there is an error in a command line argument.