SMS/ConfigMgr - Create status MIFs using batch script with no dependencies

In a past position, I've tried to use a utility from the Back Office Resource Kit called ismif32.exe to create status MIFs for those programs that aren't MSI-based or don't have the ability to create status mifs.  The problem I've had is that it just didn't always work. Usually there was some error about a DLL missing or some entry point not found or some such nonsense and I didn't have the luxury of changing anything on the clients to get it to work.  So, I did what any self-respecting geek would and I rolled my own.  I created a batch file that had no dependencies but could still make a status mif.  

You can find the MifMaker.cmd batch file HERE

SYNTAX:

      Inputs:   Parameter            Max Size    Description
                --------------------------------------------------------------------------------
                param1 = FILENAME    NONE        Unique name for the MIF file. Must end in .MIF
                param2 = COMPANY     64 bytes    Manufacturer or publisher, such as Microsoft.
                param3 = PRODUCT     64 bytes    Product or program name, such as Office 2000.
                param4 = VERSION     64 bytes    Version of the product, such as 8.0a.
                param5 = SERIALNO    64 bytes    Serial number of the product.
                param6 = MESSAGE     128 bytes   Descriptive message about the status of the
                                                 installation which is added to the program's
                                                 status message.
                param7 = STATUS      N/A         (BOOLEAN) Install status. Set to TRUE for
                                                 success; otherwise FALSE.


                (FOLLOWING NOT IMPLEMENTED)
                param8 = REBOOT      N/A         (BOOLEAN) Informs SMS that the program it
                                                 launched has finished and executed a reboot.
                                                 TRUE or FALSE.

     Outputs:   status mif in temp directory of executing user's context
Dependencies:   ability to write file to %temp%

 Description:   Makes an installation status mif and puts it in the temp folder

EXAMPLES:

mifMaker.cmd myProduct.mif "My Company" "My Product" "1.0.0" "" "Can't Find Source Files" FALSE

mifMaker.cmd myProduct.mif "My Company" "My Product" "1.0.0" "" "Success" TRUE

mifMaker.cmd myProduct.mif "" "" "" "" "" TRUE

 

Basically, you have to enter all of the parameters, whether you use empty strings or not.  Hey, it's not pretty, it's functional.  And I did this many years ago.

Number2 (John Nelson)
MyITForum - Forum Posts
MyITForum - Blog
Add to Google

 

Published Tuesday, January 13, 2009 2:39 PM by jnelson

Comments

No Comments
Powered by Community Server (Commercial Edition), by Telligent Systems