The Program Status MIF is used to return information about the success or failure of a program back to the Systems Management Server. This MIF file is usually created by the SETUP.EXE or MSIEXEC.EXE setup utilities (see their respective documentation for appropriate command-line switches).
From time to time, it is necessary to manually create your own MIF file to return status. Typically, this is when you have SMS executing a batch file, command script, or similar and that script may need to present an error code to SMS. Use the information here to draft your own MIF file.
MIF File Format
The program status MIF file has the following fixed syntax:
START COMPONENT
NAME = "WORKSTATION"
START GROUP
NAME = "ComponentID"
ID = 1
CLASS = "DMTF|ComponentID|1.0"
START ATTRIBUTE
NAME = "Manufacturer"
ID = 1
ACCESS = READ-ONLY
STORAGE = SPECIFIC
TYPE = STRING(64)
VALUE = "Value of the Publisher field in the package properties"
END ATTRIBUTE
START ATTRIBUTE
NAME = "Product"
ID = 2
ACCESS = READ-ONLY
STORAGE = SPECIFIC
TYPE = STRING(64)
VALUE = "Value of the Name field in the package properties"
END ATTRIBUTE
START ATTRIBUTE
NAME = "Version"
ID = 3
ACCESS = READ-ONLY
STORAGE = SPECIFIC
TYPE = STRING(64)
VALUE = "Value of the Version field in the package properties"
END ATTRIBUTE
START ATTRIBUTE
NAME = "Locale"
ID = 4
ACCESS = READ-ONLY
STORAGE = SPECIFIC
TYPE = STRING(16)
VALUE = ""
END ATTRIBUTE
START ATTRIBUTE
NAME = "Serial Number"
ID = 5
ACCESS = READ-ONLY
STORAGE = SPECIFIC
TYPE = STRING(64)
VALUE = "Can be any arbitrary value"
END ATTRIBUTE
START ATTRIBUTE
NAME = "Installation"
ID = 6
ACCESS = READ-ONLY
STORAGE = SPECIFIC
TYPE = STRING(64)
VALUE = "DateTime"
END ATTRIBUTE
END GROUP
START GROUP
NAME = "InstallStatus"
ID = 2
CLASS = "MICROSOFT|JOBSTATUS|1.0"
START ATTRIBUTE
NAME = "Status"
ID = 1
ACCESS = READ-ONLY
STORAGE = SPECIFIC
TYPE = STRING(32)
VALUE = "Either the word Success or the word Failed"
END ATTRIBUTE
START ATTRIBUTE
NAME = "Description"
ID = 2
ACCESS = READ-ONLY
STORAGE = SPECIFIC
TYPE = STRING(128)
VALUE = "Can be any arbitrary value"
END ATTRIBUTE
END GROUP
END COMPONENTHow Does SMS Find the MIF?
SMS looks for the MIF file to be placed in either the machines temp directory (%TEMP%) or the system root directory (%SYSTEMROOT%). SMS also ensures that the MIF file was created
after the program execution was started to make sure that it does not accidentially import incorrect status information.
Once SMS finds a matching MIF file, it will parse the file and, if valid, it will transmit the data back to the SMS server. It will then delete the MIF file from the file system.
If SMS does not find a matching MIF file, then it does not delete any files (MIF or otherwise) and returns a SUCCESS value if the exit code from the executed process was
0. Any other value results in a FAILED value being returned up to the SMS server.
How Does Matching Work?
SMS will use the information from the General tab of the Package properties unless the selection is made on the Reporting tab to use alternate values. If a value is missing from the text box on the selected tab, then that field will not be used for matching a MIF file.
For instance, if the administrator had selected to use the Reporting tab and specified the Name field as "ProductName" and the Version field as "1.0", then it would match a MIF file whose Manufacturer was set to "ACME", Product was set to "ProductName" and Version was set to "1.0" (only the Product and Version fields are being matched).