Knowledge Base

How to replace in-use files at Windows restart

Article ID: 181345

Article Last Modified on 2/22/2007


APPLIES TO


This article was previously published under Q181345
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 Description of the Microsoft Windows Registry

SUMMARY

If you need to replace a file that is in use by Microsoft Windows, you typically must use one of the following methods: This article describes another method you can use to replace files that are in use by Windows. This method uses the registry to replace a file at startup, before the file is accessed by Windows.

MORE INFORMATION

Warning If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.
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 is bootable.
  1. Start Registry Editor (Regedt32.exe).
  2. Locate the following key in the Windows registry:

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager

  3. Create a new value by using the following information:

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

    Note that the value data is typed on two separate lines.
  4. Quit Registry Editor.
  5. Restart the computer.
For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

184408 How to replace in-use Windows NT system files


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

Keywords: kbenv kbhowto KB181345