Microsoft KB Archive/269251

{|
 * width="100%"|

BUG: Automating Windows Installer May Hang When Enumerating Products

 * }

Q269251

-

The information in this article applies to:


 * Microsoft Windows Installer, versions 1.0, 1.1, 1.2

-

SYMPTOMS
When you are enumerating all programs that are installed with the Windows Installer, the process may hang. This is true only if the enumeration is done through automation to the Windows Installer engine and not by calling the MsiEnumProducts API function directly.

CAUSE
This is a bug in the OLE automation layer of Windows Installer.

RESOLUTION
IMPORTANT: This article contains information about editing the registry. Before you edit the registry, make sure you understand how to restore it if a problem occurs. For information about how to do this, view the &quot;Restoring the Registry&quot; Help topic in Regedit.exe or the &quot;Restoring a Registry Key&quot; Help topic in Regedt32.exe.

One possible reason why the process may hang is that an invalid globally unique identifier (GUID) exists in the registry under the Products key for the Installer key. A GUID is represented in the registry as thirty-two hexadecimal characters. If one of the GUID keys is longer than thirty-two characters, the process may hang.

With the help of a registry-monitoring tool, such as the following, you can find which key in question is being read repetitively:

"Regmon" The keys in question can be found under

HKEY_CURRENT_USER\Software\Microsoft\Installer\Products

-and-

HKEY_LOCAL_MACHINE\Software\Classes\Installer\Products Before making any changes to the registry, Microsoft recommends that you export the keys that are going to be modified or deleted in case that the keys are deleted or modified in error. If you do find any GUID keys that are longer than thirty-two characters, remove the keys or change them to the correct length.

STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article.

MORE INFORMATION
The following Visual Basic code may cause the process to hang if any of the GUID keys are longer than thirty-two characters:

Dim Products as Object Dim WI as Object Set WI = CreateObject(&quot;WindowsInstaller.Installer&quot;) Set Products = WI.Products 'this line may hang