How to Replace Files In Use at Windows NT Restart

ID: Q181345


The information in this article applies to:

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:

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           : winnt:4.0
Platform          : winnt 
Issue type        : kbhowto 

Last Reviewed: May 4, 1999