File.DeleteOnReboot

File.DeleteOnReboot ( 

string Filename )

Example 1

File.DeleteOnReboot(_TempFolder.."\\DeleteMe.exe");

Removes the "DeleteMe.exe" file on the next system reboot.

Note: _TempFolder is a built-in variable that contains the path to the user's Temp directory.

Example 2

File.DeleteOnReboot("C:\\instructions.doc");

Deletes the file located at "C:\instructions.doc" on the next system reboot.

See also:  Related Actions