Knowledge Base

BUG: Client Installation EXE can Corrupt the Registry

Article ID: 184398

Article Last Modified on 3/16/2005


APPLIES TO


This article was previously published under Q184398

SYMPTOMS

If one of your Microsoft Transaction Server (MTS) components does not register a ProgID, then the MTS package export feature generates a bad client installation EXE. Any client installation EXE file generated for that component deletes large portions of the registry when it is run. After running such a client installation EXE you must reinstall the operating system.

CAUSE

The MTS client installation EXE expects the components to register a ProgID.

RESOLUTION

The two workarounds for this behavior are:

  • Make sure that all components in your MTS packages register a ProgID.

    -or-
  • Do not use client installation executables to configure clients of those components.
You also need to consider the following:

  • Visual Basic (VB) components always register ProgID's.
  • Microsoft Foundation Class (MFC) components register ProgID's by default. If, however, you change the code around enough, you can cause them to stop registering ProgID's.
  • The Active Template Library (ATL) object wizard creates components that generate ProgID's. Again, if you change the code around you can cause these objects to stop registering ProgID's.
Conversely, many technologies require you to add code by hand to your component to register its ProgID. This code should be added to the implementation of the DllRegisterServer API function. In particular, the following technologies do not automatically generate such code:

  • ATL, when generated without the aid of the ATL Object Wizard.
  • Visual J++
  • C or C++ components generated without the aid of ATL or MFC.

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article. This bug has been fixed in Microsoft Windows NT 4.0 Service Pack 4 (SP4).

MORE INFORMATION

Steps to Reproduce Behavior

WARNING: REPRODUCTION OF THIS BUG REQUIRES A REGISTRY RESTORATION OR COMPLETE SYSTEM RE-INSTALLATION.

Create a component without a ProgID. Install or import the component into an MTS package. Now export the package. This produces a .pak file (the server-side deployable form of the package) in the directory you specified, as well as an EXE file in the clients directory under that directory. This EXE file is the client-side remote application setup program, and it installs the necessary components for a client to talk to a server.

Now that you have produced the faulty client installation executable, run the EXE. The result is that the HKEY_CLASSES_ROOT tree in the registry will be deleted. This in turn causes every application using COM to stop functioning.

Additional query words: Corrupt Registry, No CLSID

Keywords: kbbug kbnofix kbdeployment KB184398