Movefileex's movefile_delay_until_reboot flag usage!

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.