DOCUMENT:Q102359  27-AUG-1993  [W_NT]
TITLE   :INF: Replacing Corrupted System Files in Windows NT
PRODUCT :Windows NT
PROD/VER:3.10
OPER/SYS:WINDOWS
KEYWORDS:

----------------------------------------------------------------------
The information in this article applies to:

 - Microsoft Windows NT operating system, version 3.1
 - Microsoft Windows NT Advanced Server, version 3.1
----------------------------------------------------------------------

To enable a Windows NT machine with a corrupt .DLL file to complete the
logon process successfully, you must replace the .DLL with a new,
renamed version of the file:

1. From a Windows NT machine that has an uncorrupted version of the
   .DLL file you want to replace, connect to the machine with the
   corrupt .DLL file as Administrator.

2. From the remote machine, place a new, uncorrupted copy the of the
   file in the SYSTEM32 directory on the machine with the damaged
   file (use a different filename for the copy of the file).

3. From the remote machine, run REGEDT32.EXE, to edit the registry on
   the affected machine.

   WARNING: Registration Information Editor (REGEDT32.EXE) is a very
   powerful utility that allows you to directly change the Registry
   Database. Using Registration Information Editor incorrectly can
   cause serious problems, including hard disk corruption. It may be
   necessary to reinstall the software to correct any problems.
   Microsoft does not support changes made with Registration
   Information Editor. Use this tool at your own risk.

4. Locate the following section:

   HKEY_LOCAL_MACHINE on (Remote Machine Name)
      SYSTEM\CurrentControlSet\Control\SessionManager\KnownDLLS.

5. In this section, change the name of the file pointed to by the key
   to the new, renamed version of the file that was copied to the
   SYSTEM32 directory. Close REGEDT32 and restart the machine with the
   previously corrupted file.

The machine should start up and complete the logon process.

MORE INFORMATION
================

For example, if the SHELL32.DLL file is corrupt, the following error
message is displayed after you enter your password and attempt to
complete the logon process:

   The application failed to initialize properly (0xc0000139).
   Click OK to terminate the application.

The application that has failed to start is Program Manager. At this
point, Windows NT is nonfunctional. Attempting to copy SHELL32.DLL
from a remote machine will not be effective since the file is marked
as in use by Windows NT. To replace the corrupt SHELL32.DLL do the
following:

1. Connect to the affected machine's root with a functioning Windows NT
   machine as Administrator.

2. Copy a new SHELL32.DLL from the functioning machine to the affected
   machine's <SYSTEMROOT>\WINNT\SYSTEM32 using the filename
   SHELLALT.DLL.

3. Edit the affected machine's registry by running REGEDT32.EXE and
   scrolling to the following section:

      HKEY_LOCAL_MACHINE on (Remote Machine Name)
         SYSTEM\CurrentControlSet\Control\SessionManager\KnownDLLS.

   The SHELL32.DLL key will point to the file SHELL32.DLL. Change
   that key so that it points to the new file SHELLALT.DLL.

   Before Registry Edit:

   Existing Value Names       Data Type   String
   --------------------------------------------------------------------
   SHELL32.DLL                REG_SZ      SHELL32.DLL


   After Registry Edit:

   Existing Value Names       Data Type   String
   --------------------------------------------------------------------
   SHELL32.DLL                REG_SZ      SHELLALT.DLL


4. Close REGEDT32 on the remote machine and restart the affected
   machine. The machine should start and complete the logon process
   with the new SHELLALT.DLL.

Additional reference words: 3.10 tshoot
KBCategory:
KBSubcategory: winnt howto

=============================================================================

THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS
PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND.  MICROSOFT DISCLAIMS
ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  IN NO
EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR
ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL,
CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF
MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.  SOME STATES DO NOT ALLOW THE EXCLUSION
OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES
SO THE FOREGOING LIMITATION MAY NOT APPLY.

Copyright Microsoft Corporation 1993.