Microsoft.Sysinternals.MoveFileThis MoveFile utility allows you to schedule move and delete commands for the next reboot.
$ winget install --id Microsoft.Sysinternals.MoveFile --exact --version 1.02Run in Command Prompt, PowerShell, or Windows Terminal. Prompts for any agreements.
For Intune admins
Automated application patching for Microsoft Intune. Pckgr keeps a curated library of 1,000+ apps continuously up-to-date in your tenant via Microsoft Graph — no manual repackaging, no chasing vendor sites.
See Pckgr's app libraryThere are several applications, such as service packs and hotfixes, that must replace a file that's in use and is unable to. Windows therefore provides the MoveFileEx API to rename or delete a file and allows the caller to specify that they want the operation to take place the next time the system boots,before the files are referenced. Session Manager performs this task by reading the registered rename and delete commands from the HKLM\System\CurrentControlSet\Control\Session Manager\PendingFileRenameOperations value.
MoveFile usage:
The included MoveFile utility allows you to schedule move and delete commands for the next reboot:
usage: movefile [source] [dest]
Copy a command tailored to that specific architecture, type, and scope - useful when winget would otherwise pick a different default.