PRB: Troubleshooting MoveFileEx() MOVEFILE_DELAY_UNTIL_REBOOTID: Q202071
|
When you call MoveFileEx() with the MOVEFILE_DELAY_UNTIL_REBOOT flag, sometimes the system might not rename the specified file or directory successfully at restart.
To troubleshoot this problem, first check whether the location of the file or directory to be renamed is stored in the following registry value after the MoveFileEx() call:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\PendingFileRenameOperations
The system uses this registry value to complete the move operation at restart. When the MoveFileEx() call succeeds, this registry value is created. For the MOVEFILE_DELAY_UNTIL_REBOOT flag, the calling process needs to be in the context of a user who belongs to the administrator group or the LocalSystem account. By default, only Administrators and LocalSystem have write access to the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager registry key where the PendingFileRenameOperations value is created.
Additional query words:
Keywords : kbAPI kbFileIO kbKernBase kbNTOS400
Version : winnt:4.0
Platform : winnt
Issue type : kbprb
Last Reviewed: February 5, 1999