How to Replace Files In Use at Windows NT Restart

ID: Q181345


The information in this article applies to:
  • Microsoft Windows NT Workstation version 4.0
  • Microsoft Windows NT Server version 4.0
  • Microsoft Windows NT Server, Enterprise Edition version 4.0
  • Microsoft Windows 2000 Professional
  • Microsoft Windows 2000 Server
  • Microsoft Windows 2000 Advanced Server


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 "Restoring the Registry" Help topic in Regedit.exe or the "Restoring a Registry Key" Help topic in Regedt32.exe.

SUMMARY

If you need to replace a file that is in use by Windows NT, you normally must use one of the following methods:

  • Start the computer with an MS-DOS boot disk to replace the file if your computer uses the File Allocation Table (FAT) file system on the boot partition.


  • Perform a parallel installation of Windows NT if the boot partition uses the Windows NT file system (NTFS).


  • Use the Mv.exe method specified in the following article in the Microsoft Knowledge Base:
    ARTICLE-ID: Q184408
    TITLE : How to Replace In-Use Windows NT System Files


  • Rename the file at a Windows NT command prompt. To do so, type the following lines at a command prompt, pressing ENTER after each line:

    ren <drive>:\<path>\<file>.sys <drive>:\<path>\<file>.old
    copy <drive>:\<temp folder>\<file>.sys <drive>:\<path>\<file>.sys

    After you type these lines, restart the computer. Many files cannot be renamed using the Windows Explorer shell, but can be renamed using a command prompt.


This article describes another method you can use to replace files that are in use by Windows NT. This method uses the registry to replace a file at startup, before the file is accessed by Windows NT.


MORE INFORMATION

WARNING: Using Registry Editor incorrectly can cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that problems resulting from the incorrect use of Registry Editor can be solved. Use Registry Editor at your own risk.

For information about how to edit the registry, view the "Changing Keys And Values" Help topic in Registry Editor (Regedit.exe) or the "Add and Delete Information in the Registry" and "Edit Registry Data" Help topics in Regedt32.exe. Note that you should back up the registry before you edit it. If you are running Windows NT, you should also update your Emergency Repair Disk (ERD).

The following steps demonstrate how to replace the Win32k.sys file in the %SystemRoot%\System32 folder with the Win32k.sys file located in the C:\Temp folder. You can use variations of this method to replace any file if your installation of Windows NT is bootable.

  1. Start Registry Editor (Regedt32.exe).


  2. Locate the following key in the Windows NT registry:

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager


  3. Create a new value using the following information:

    Value name: PendingFileRenameOperations
    Data type : REG_MULTI_SZ
    Value data: \??\c:\temp\win32k.sys
    !\??\c:\winnt\system32\win32k.sys


    Note that the value data is typed on two separate lines.


  4. Quit Registry Editor.


  5. Restart the computer.


For additional information, please see the following article in the Microsoft Knowledge Base:
Q184408 How to Replace In-Use Windows NT System Files

Additional query words: replaced inuse in use system files file FileRenameOperations cannot rename

Keywords : kbenv msient ntboot nthowto ntfilesys
Version : WINDOWS:2000; winnt:4.0
Platform : WINDOWS winnt
Issue type : kbhowto


Last Reviewed: January 20, 2000
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.