How to replace in-use files at Windows restart

Article translations Article translations
Article ID: 181345 - View products that this article applies to.
This article was previously published under Q181345
Expand all | Collapse all

SUMMARY

If you need to replace a file that is in use by Microsoft Windows, you typically 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 if the boot partition uses the Windows NT file system (NTFS).
  • Use the Mv.exe method that is specified in the following article in the Microsoft Knowledge Base:
    184408 How to replace in-use Windows NT system files
  • Rename the file at a Windows 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. This method uses the registry to replace a file at startup, before the file is accessed by Windows.

MORE INFORMATION

Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge Base:
322756 How to back up and restore the registry in Windows

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

Properties

Article ID: 181345 - Last Review: February 22, 2007 - Revision: 3.6
APPLIES TO
  • Microsoft Windows 2000 Server
  • Microsoft Windows 2000 Advanced Server
  • Microsoft Windows 2000 Professional Edition
  • Microsoft Windows 2000 Datacenter Server
  • Microsoft Windows NT Workstation 4.0 Developer Edition
  • Microsoft Windows NT Server 4.0 Standard Edition
  • Microsoft Windows NT Server 4.0 Enterprise Edition
  • Microsoft Windows Server 2003, Standard Edition (32-bit x86)
Keywords: 
kbenv kbhowto KB181345

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com