Skip navigation

JSI Tip 0578 - More on replacing inuse files.

In tip 181 I described one method for replacing inuse files.

NOTE: See MoveFile.exe for a much simpler method.

You can also replace inuse files by editing:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager and ammend or Add Value name PendingFileRenameOperations, a type REG_MULTI_SZ value. Each rename use two lines

Line 1 contains: \??\<Drive:>\<SourcePath>\SourceFileName.Extension

Line 2 contains: !\??\<Drive:>\<DestinationPath>\DestinationFileName.Extension

If you had additional files, they would be line 3 and 4, 5 and 6, etc....

At the next boot, the <Drive:>\<SourcePath>\SourceFileName.Extension
is moved to the <Drive:>\<DestinationPath>\DestinationFileName.Extension
and the PendingFileRenameOperations value name is deleted.



Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish