Author: Fernando Silva
How can I tell the system to rename a file on the next reboot?
Windows has a mechanism to replace files that are currently in use on next boot. So
what the program could do is
save the updated version under another name, preferably in the applications
directory (source and target need to be on the same volume).
the execute the following code:
1 2 if Win32Platform = VER_PLATFORM_WIN32_NT then3 MoveFileEx(Pchar(tempFilenameWithPath),
5 MOVEFILE_REPLACE_EXISTING or MOVEFILE_DELAY_UNTIL_REBOOT)
6 else7 WritePrivateProfileString(
Note that the wininit.ini file needs to be set up using the short (DOS 8.3) versions of long path and filenames.