The QueryOSDBinaryInjectionStatus Windows Management Instrumentation (WMI) class method, in Configuration Manager, queries the current status of the injection of operating system deployment binaries into a boot image.

The following syntax is simplified from Managed Object Format (MOF) code and defines the method.

SInt32 QueryOSDBinaryInjectionStatus(
	 String ContextID,
	 UInt32 Status,
	 UInt32 Progress,
	 UInt32 MaxProgress,
	 String ProgressText,
	 SInt32 ErrorCode,
	 String ExtendedErrorInfo
);

Parameters

ContextID

Data type: StringQualifiers: [in]The ID of the context (index) optionally associated with the status upon import of a boot image. This ID is indicated by the ContextID property of SMS_BootImagePackage Server WMI Class.
Status

Data type: UInt32Qualifiers: [out]The current status of binary injection. Possible values are:

0

Complete

1

In progress

2

Error

3

No status

Progress

Data type: UInt32Qualifiers: [out]The progress status indicating the number of the current step in the binary injection operation.
MaxProgress

Data type: UInt32Qualifiers: [out]The total number of steps in the binary injection operation.
ProgressText

Data type: StringQualifiers: [out]A user-readable string identifying the current progress of the binary injection operation.
ErrorCode

Data type: SInt32Qualifiers: [out]A 32-bit error code in case of an error in the binary injection operation. An example of an error code is FILE_NOT_FOUND (2). The log file contains error code details.
ExtendedErrorInfo

Data type: StringQualifiers: [out]Additional error information if the ErrorCode parameter is set to an error code. Currently this parameter is used to report driver file information if the binary injection operation fails to inject the binaries for a particular driver.

Return Values

An SInt32 data type that is 0 to indicate success or non-zero to indicate failure.

For information about handling returned errors, see About Configuration Manager Errors.

Remarks

To use the QueryOSDBinaryInjectionStatus method, your application must:

  1. Establish a connection to the SMS Provider. For more information see, About the SMS Provider in Configuration Manager.

  2. Access the SMS_BootImagePackage Server WMI Class object.

  3. Call the ExportDefaultBootImage Method in Class SMS_BootImagePackage.

  4. Then call QueryOSDBinaryInjectionStatus as needed to find out the status of the binary injection operation.

  5. Use the values of the Progress and MaxProgress parameters to determine the percent complete status of the binary injection operation.

Requirements

Runtime Requirements

Development Requirements

See Also