Help and Support
 

powered byLive Search

BUG: Automating Windows Installer May Hang When Enumerating Products

Retired KB ArticleThis article was written about products for which Microsoft no longer offers support. Therefore, this article is offered "as is" and will no longer be updated.
Article ID:269251
Last Review:October 2, 2003
Revision:2.0
This article was previously published under Q269251

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.

Back to the top

CAUSE

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

Back to the top

RESOLUTION

IMPORTANT: This article contains information about modifying the registry. Before you modify the registry, make sure to back it up and make sure that you understand how to restore the registry if a problem occurs. For information about how to back up, restore, and edit the registry, click the following article number to view the article in the Microsoft Knowledge Base:
256986 (http://support.microsoft.com/kb/256986/EN-US/) Description of the Microsoft Windows Registry

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 (http://www.sysinternals.com)
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.

Back to the top

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

Back to the top

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("WindowsInstaller.Installer")
Set Products  = WI.Products 'this line may hang
				

Back to the top

REFERENCES

For more information on the Windows Installer, you can download the Windows Installer SDK from the MSDN downloads page on the following Microsoft Web site:
http://msdn.microsoft.com/downloads/default.asp?URL=/code/sample.asp?url=/msdn-files/027/001/457/msdncompositedoc.xml (http://msdn.microsoft.com/downloads/default.asp?URL=/code/sample.asp?url=/msdn-files/027/001/457/msdncompositedoc.xml)

Back to the top


APPLIES TO
Microsoft Windows Installer 1.0
Microsoft Windows Installer 1.1
Microsoft Windows Installer 1.2

Back to the top

Keywords: 
kbbug kbpending KB269251

Back to the top

Article Translations

 

Other Support Options

  • Need More Help?
    Contact a Support professional by Email, Online or Phone.
  • Customer Service
    For non-technical assistance with product purchases, subscriptions, online services, events, training courses, corporate sales, piracy issues, and more.
  • Newsgroups
    Pose a question to other users. Discussion groups and Forums about specific Microsoft products, technologies, and services.