Create Function
Applies To: System Center Configuration Manager 2007, System Center Configuration Manager 2007 R2, System Center Configuration Manager 2007 R3, System Center Configuration Manager 2007 SP1, System Center Configuration Manager 2007 SP2
The Create function creates a status MIF file that Configuration Manager 2007 uses to correlate the install status for an advertisement.
StatusMIF.Create(
ByVal bstrFileName As String _
ByVal bstrCompany As String _
ByVal bstrProduct As String _
ByVal bstrVersion As String _
ByVal bstrLocale As String _
ByVal bstrSerialNo As String _
ByVal bstrMessage As String _
ByVal bStatus As Long _
);
Parameters
- bstrFileName
Unique name for the MIF file. A file extension must be .mif. The function writes the file to the %TEMP% directory.
- bstrCompany
Manufacturer or publisher of the product, for example, Microsoft. This parameter is limited to 64 characters.
- bstrProduct
Product or program name, for example, Office 2000. This parameter is limited to 64 characters.
- bstrVersion
Version of the product, for example, 8.0a. This parameter is limited to 64 characters.
- bstrLocale
Country/region or language code, for example, ENU. This parameter is optional and is limited to 16 characters.
- bstrSerialNo
Serial number of the product. This parameter is optional and is limited to 64 characters.
- bstrMessage
Descriptive message about the status of the installation, added to the program status message. This parameter is limited to 128 characters.
- bStatus
true if the install status is success.
Return Values
None.
Remarks
Your installation (setup) application must create only one install status MIF file for the package. The file name must be unique so that multiple installations in a single session can report status without a conflict.
Installations that run on localized versions of Configuration Manager must specify values in the appropriate format: ANSI format for European languages; DBCS format for East Asia languages.
Your application must call InstallStatusMIF before the installation exits. The MIF file is not reported to Configuration Manager if the installation creates another process that calls InstallStatusMIF.
Note that the parameters bstrFilename, bstrCompany, bstrProduct, and bstrVersion are directly related to the SMS_Package Server WMI Class properties MIFFileName, MIFPublisher, MIFName, and MIFVersion, respectively. These parameters and properties must contain the same values.
The example in the next section shows how to call the Create method.
Example
[VisualBasic]
Dim MIFStatus As New InstallStatusMIF
MIFStatus.Create "MyStatusFile", _
"MyCompany", _
"MyProduct", _
"1.00.000", _
"ENU", _
" ", _
"Installation Successful", _
True
Requirements
Windows NT/2000: Requires Windows NT 4.0 or later.
Windows 95/98: Requires Windows 95 or later.
Version: Requires SMS 2.0.
Library: Included as a resource in IsMIFCom.dll (Visual Basic).