This flag is generally used by the installer. For example, if you want to install a new driver, it cannot be deleted or overwritten because the old driver is still used by the system. In this case, the installer can copy the new driver to a temporary directory and use the movefile_delay_until_reboot flag to call movefileex ,. After the system is restarted, the system replaces the old driver with a new driver before it starts. This flag can be used to overwrite a file after restart.
It can also delete a file after restart. This method can be used when the file to be deleted cannot be deleted because it is used by the system. For example: movefileex (szdstfile, null, movefile_delay_until_reboot );
However, the movefileex function is not supported in Windows 95/98. to rename or delete an object after restart, you can do this:
1. Check whether the wininit. ini file exists in the Windows directory;
2. If the wininit. ini file exists, open and add a new item to the [rename] field. If the file does not exist, create the file and create the [rename] field.
3. Add the following format:
Destinationfilename = sourcefilename
Both values must use short file names. NUL = destinationfilename can be used to delete an object.