Easy MSI Icon and GUID Extraction for SCCM 2012 Application Catalog (CSI_ExtractMSIGUIDAndIcons.vbs) Print E-mail

Are you moving your many packages to the SCCM 2012 Application Catalog?  It can be a challenge getting the icons out of those huge MSI packages if you don’t want to install each one!  Not any more…

The SCCM 2012 Application Catalog allows you to use the application’s icon in the catalog. 

It also allows you to use the MSI Product Code as the detection method to determine if the application is already installed.  

The importance of detection rules goes beyond the end user's application catalog experience as noted by this bit from Windows Management Experts: 

"While complex, these new detection methods allow administrators to finely tune their installers to ensure that they only get to the devices that need them. Setting these detection methods up correctly will also give you a better count of machines that have something installed. Even if the user does not install the application from Software Center or the Application Catalog, their devices will still register as having the program." SCCM 2012: Application Deployment Detection Methods

The SCCM console allows for easy extraction of the Product Code from an MSI - but the icons are a different matter.

If you have several hundred MSI’s (or more) to convert, getting the icon from your MSI packages can be a challenge.

Our walk through video demonstrates what the script can do for you:

Of course you can install the package or do an admin install – but both require much more time and disk space than doing an MSI “Advertise” of the package.

MSI Advertising is a feature that is generally not used by companies in their production environment.  It is important not to confuse an “MSI Advertise” with advertising packages in Group Policy, SCCM or any other external system.

MSI Advertising has the following advantages over a full install or admin install:

  • virtually zero disk space required because an Advertise only extracts icon bearing files.
  • very fast – even on large packages (again because an Advertise only extracts icon bearing files).
  • no need to sort through all the folders and files in search of the correct icon file.
  • icons are in a known location that can be scripted to open up on the desktop.
  • it is quick to remove an advertised package compared to uninstalling.

With these advantages in mind, we have written a script to automate this for you.

The script also removes the MSI Advertisement after you’ve gotten the icons you need.

There are two ways to run the script:

  1. Drag and drop any .MSI file onto the script.
  2. Run the script and it “installs” itself by adding the new menu choice “CSI-Windows.com Extract GUID and Icons” to the Windows Explorer context menu (right-click) for .MSI files. 

If you move the script after installing, you’ll need to run it again to have the content menu extension registered to the new location.

When you select the menu item “Extract GUID and Icons”, the script does the following:

  1. Check the local system to see if this package is already installed, if it is installed:
    1. Open the icon cache in explorer and
    2. Present a prompt containing the Product code GUID
  2. If the package is NOT installed
    1. perform a per-user [no admin rights required] MSI Advertise [much faster than admin installs] of the package on the local machine
    2. Open the icon cache folder.
    3. Present a prompt containing the Product code GUID – which also functions as a “press any key prompt”
    4. The User can copy the GUID and extract the icon using SCCM 2012
    5. After the user presses “OK”, MSI Unadvertise (uninstall) the product (only if the script was used to do the advertise)

The script is attached to this blog post.

Download this file (CSI_ExtractMSIGUIDAndIcons.zip)CSI_ExtractMSIGUIDAndIcons.zip[ ]3 Kb