App-V Icon Error with SCCM

Hello, my name is Patrick Mangan, and I have been sequencing with App-V. This year TMurgent added a sequencing service where we take on applications that customers are having a really hard time sequencing. Recently while working on one application that had a proprietary licensing scheme to work around I ran into another, unexpected error that I needed to troubleshoot.

After creating my package, I was able to deploy it to stand-alone clients and have them run it just fine, however when I tried to add it to SCCM as an App-V package, I receive a weird error.

Load Virtual Package Failed.

The message told me that there was a problem with some of the file icons, and SCCM would not let me complete importing the App-V package. The App-v sequencer automatically generates icon files for applications that have shortcuts or file associations.  It does this by extracting an icon resource from the executable file that would be run.  EXE and DLL files contain resource sections inside their PE format, which are normally used by the Windows Explorer to display the file.  The App-V sequencer will grab one from the file and save it as an ICO file.  This is needed at the App-V client to make the shortcuts and file associations “look right”, because the actual exe for the shortcut will be the App-V client launcher (and we don’t want all of those shortcuts looking the same).  So what was the problem with the icons and which one or ones were causing the SCCM error?

When I tried opening each of the icons from the App-V package up using the Windows Photo Viewer,  some of the icon files gave me a generic error message (shown below) that wasn’t helpful except to let me know which icons were a problem because they would generate this error.

Windows Photo Viewer cannot open this picture

These icons also could not list their details when I looked at their properties by right clicking on the file in the windows explorer.  Here are examples of a good and bad icon file.
Blank Details tab Details tab with details

App-V is known to have an issue with icons that are of rectangular (not square) dimensions, so this was my initial thought.  But rectangular icons wouldn’t have looked bad in Windows Photo Viewer so something else was going on.

To solve this problem, I opened the problematic files in Visual Studio. This gave me multiple types of information, including the image itself and version info. Deleting the extraneous information did not make the files work, but I was able to copy the graphics information and create a brand new ICO file with just the copied bitmap images. After replacing all the problematic files in this manner, I was able to create an App-V package in SCCM.

The problem appears to be that the icons for some of the obscure shortcuts were originally created by a 16-bit app, and those are not supported on the x64 systems we were using. I don’t know much about icons and the word bit has too many different meanings, so I can’t tell if these were 16-bit icons or not.  Certainly the executable behind the shortcut was not 16-bit, since it worked fine on the x64 OS.

So if you run into this error, replace out the icons!  You don’t need a fancy tool like Visual Studio.  There are lots of simple tools around that will let you draw your own icon from scratch.