Handling the application suite icon when enabling a VMware ThinApp package for Horizon

Source: VMware KB Article.

Symptoms

  • The Microsoft Office suite icon does not display properly in the Horizon Application Manager application catalog. Instead, the standard Windows icon appears.
  • The application icon for a custom application does not display properly in the Horizon Application Manager application catalog.

This is a problem that appears for very few ThinApp virtual applications. Microsoft Office is the only known commercially available application that manifests the problem. The presence of multiple entry points is not sufficient to present the problem; the application must have a suite icon, or it must have the icon stored in an unusual file.

Purpose

This article discusses an issue with application suite display icons which occurs specifically with a Microsoft Office ThinApp package in a Horizon Application Manager environment.

Cause

The virtual application package was not enabled for Horizon through Setup Capture. You may have enabled the package for Horizon by:

 

Resolution

You must enable the ThinApp package for Horizon through Setup Capture, or else discover the application suite icon and enter its value into the InventoryIcon parameter in Package.ini.
Background
The VMware Horizon application catalog displays the icon for each ThinApp package. When you capture an application with ThinApp Setup Capture, Setup Capture automatically incorporates the application display icon into the virtual application package. After you enable a ThinApp package for Horizon, the display icon appears in the Horizon application catalog.
Some applications have a suite icon as well as icons for each entry point to the application. For example, Microsoft Office has a suite icon, as well as individual icons for Word, Excel, and so on. Horizon entitles users to the entire Office suite, not to individual applications such as Word and Excel. Setup Capture handles these various icons through a new parameter in Package.ini, InventoryIcon.
InventoryIcon designates the file path for the application icon that is displayed in the Horizon Application Manager application catalog. The code for Setup Capture in ThinApp 4.7 and later discovers the application’s display icon and enters the value for the icon file path into InventoryIcon.
What causes the application suite icon to be incorrect?
If you captured a virtual application package before ThinApp 4.6.2, the value for InventoryIcon was not created. If you later enabled the package for Horizon without Setup Capture, the application icon is not incorporated into the package. This happens when you enable the package for Horizon by:
Why was a recapture officially recommended to enable a pre-4.7 ThinApp package for Horizon?
Only Setup Capture from ThinApp 4.6.2 and later properly discovers and handles the application suite icon when you enable for Horizon. If you captured a package prior to ThinApp 4.6.2, it did not contain the InventoryIcon parameter in Package.ini. If you are concerned about an application suite icon, the best practice to enable a package for Horizon if the package was created prior to ThinApp 4.6.2 is to recapture.
Finding the application suite icon file requires some knowledge and accuracy, and it is easier to use ThinApp to find that file during the capture process. The ThinApp capture process has the logic in its code to discover the icon file path.
If you are not concerned about an application suite icon and InventoryIcon, you can use alternative methods of enabling a package for Horizon (editing Package.ini or relink -h).
If you use relink -h to enable a package for Horizon, it does not enable Horizon to use the application suite icon in the package. Relink operates on the application executables and does not have access to Package.ini.
How do you solve this problem?
You can do one of the following:
  • Recapture the application with Setup Capture from ThinApp 4.7 or later
  • Enter the location of the application suite icon into Package.ini and rebuild with ThinApp 4.7 or later
To enter the application suite icon location into the InventoryIcon value in Package.ini, you must discover the location of the icon file, or you may already know the location. Various PE (Portable Executable) resource browser tools, such as PEBrowse Pro, can help you to find the icon resources. Note that the icon file may be, but is not necessarily, the same file as the application executable file within the virtual package.
Use the following syntax to enter the application suite icon location into InventoryIcon.
InventoryIcon syntax

 

InventoryIcon goes under [BuildOptions] in Package.ini because it applies to the entire package, not to any one entry point.
The syntax for InventoryIcon is:

InventoryIcon=<IconFile>,<IconIndex>

where:
IconFile is the virtual path within the package to the binary file (EXE, DLL, or ICO) containing the application’s icon.
IconIndex is an integer representing the icon’s numerical order within the binary file.
The valid integers are negative, zero, or positive.
Zero is the first icon in the file, and the following ones are numbered 1, 2, 3, and so on. If negative, IconIndex is the icon’s ResourceID.
The default value is 0, the first icon in the file, if no IconIndex is entered.
The icon can be within an EXE file (the actual application executable), an ICO file, or a DLL file. If the file is an ICO file, there is only one icon in the file, so a value for IconIndex is unnecessary. EXE or DLL files often contain more than one icon, and the IconIndex is necessary to identify a specific icon.
Examples:
Mozilla Firefox:
InventoryIcon=%ProgramFilesDir%\Mozilla Firefox\firefox.exe,0
Opera 11.51:
InventoryIcon=%ProgramFilesDir%\Opera\Opera.dll,0
Skype:
InventoryIcon=%SystemRoot%\Installer\{5C82DAE5-6EB0-4374-9254-BE3319BA4E82}\Skype.ico
Microsoft Office Professional 2007:
InventoryIcon=%ProgramFilesDir%\Microsoft Office\Office12\POWERPNT.EXE
Note: for Office 2007, the icon in the PowerPoint executable is the Office suite icon, not the PowerPoint icon.
Is this an official solution? Can you call Technical Support if it doesn’t work?
The supported way to integrate an application suite icon into a ThinApp package for Horizon is to use Setup Capture. Discovering the icon yourself and entering it into Package.ini is an unofficial, unsupported workaround. Results may vary.
What happens if you do not recapture, but instead edit Package.ini and rebuild?
If you edit Package.ini to set values for AppID, NotificationDLLs, and HorizonOrgUrl and then rebuild to enable a pre-4.6.2 ThinApp package for Horizon, in most cases, the icon displayed in Horizon is correct. However, for an application like Microsoft Office, the Office “suite” icon, not the icon for Word or Excel or another individual application within Office, needs to appear in the Horizon Application Manager application catalog. If you do not recapture, the icon will be the generic Windows icon:
instead of the Office icon:
Is there any other functional difference if you do not recapture? Will the package still open if the user selects the application from the generic Windows icon?
The only problem is the display of the icon.
When the user selects the application from the generic Windows icon, the application still opens.
For Microsoft Office, even though the generic Windows icon is displayed, the icon still has a ‘+’ on it, and the ‘+’ expands into the individual application icons, such as Word and Excel.
Is this true only for Microsoft Office?
As far as VMware knows, yes. But other applications may handle “suite” icons in the same way as Microsoft Office. Note that when you capture multiple entry points, each entry point usually has the same icon as the main entry point. This is not so with Microsoft Office.
So, why not just publish the location of the Microsoft Office icon file?
The Office icon is in a little-known DLL file, and its path differs according to how Office is installed and which component applications are chosen during capture.
Does the snapshot.exe command-line capture also automatically handle the discovery of the InventoryIcon value for an application?

Yes, snapshot.exe also automatically discovers the InventoryIcon value for a package during capture. However, snapshot.exe does not have options to enable a package for Horizon.
Even when you use Setup Capture to enable a ThinApp package for Horizon, why do you sometimes see a generic Windows icon displayed in Horizon?
Very rarely, ThinApp 4.7 Setup Capture cannot discover the icon file. In that case, the generic Windows icon appears in the Horizon Application Manager application catalog.
This may occur with a custom application that stores the application icon in an unusual location.
If recapturing the application with Setup Capture, including enabling the package for Horizon, does not solve the problem, call VMware Technical Support.

Additional Information

ThinApp package icon problems in Citrix XenApp
Sometimes an application display icon does not appear properly when you publish a ThinApp package through Citrix XenApp. In this case, this is a XenApp problem. See How does one use a ThinApp’d program on Citrix XenServer?
Customizing the ThinApp package icon in Horizon
You can customize the icon displayed for a ThinApp package in the Horizon application catalog. You do not do this within Horizon, but instead must recreate the ThinApp package with a new icon specification in the InventoryIcon parameter.
Before ThinApp 4.7.2, you had to delete the prior application from the Horizon catalog and ThinApp Repository, delete the database entry from the Horizon Connector, and then reload the updated ThinApp package onto the ThinApp Repository. With ThinApp 4.7.2 and later, you can use the Horizon ThinApp package update mechanism (see Updating VMware ThinApp virtual applications in Horizon Application Manager).
When did the InventoryIcon parameter appear?
InventoryIcon is a new parameter introduced in ThinApp 4.6.2 for the purpose of the development of the Horizon / ThinApp integration.
Is InventoryIcon used for anything else?
No. Although InventoryIcon is discovered and entered into Package.ini for any package captured with Setup Capture or snapshot.exe from ThinApp 4.6.2 on, InventoryIcon is used only for Horizon. InventoryIcon will appear in Package.ini whether you enable the package for Horizon or not.
Source: VMware KB Article 



Leave a Reply

Your email address will not be published. Required fields are marked *