Tells Windows to move a file from one location to another the next time that the system is rebooted.
Action ID: 74
Action Category: Reboot
The path and filename of the file that you would like to move.
The path and filename that you would like the file moved to. Important: On Windows 95/98/ME systems, the destination cannot contain long path or file names, i.e., the destination path must conform to the DOS 8.3 naming convention. Windows NT, 2000 and XP do not suffer from this limitation; however, if your installer needs to run on Windows 95, 98 or ME, you will need to use the DOS 8.3 naming convention to ensure that the action will work for all users.
(More info: Windows 95, Windows 98 and Windows ME allow for a file to be moved automatically on reboot when an entry is placed in a specific INI file. This operation occurs very early in the boot process, and uses a DOS mode operation that doesn't understand Windows long filenames. The Move File on Reboot action will automatically investigate the Source file that you provide to determine its short filename, so you can use a long filename in the Source field and it will be converted automatically. But the same cannot be done for the Destination filename, because the DOS mode operation is unable to create long filenames. Even if the destination filename were converted automatically, Windows would not be able to locate the file using the long path and filename that you entered in the Destination field, because the DOS mode operation would have created the file without any long filename information. Windows NT, Windows 2000, and Windows XP use a different mechanism to move files on reboot, so they can handle long filenames with no problems.)
Note: The destination directory MUST already exist when performing this action. If Destination specifies a path to a file, all of the folders included in the path must already exist. You can use a Create Directory action to create a destination directory if necessary.
Value |
Simple Message |
Verbose Message |
0 (OK) |
OK |
|
1 |
Failed move file on reboot command. |
Could not set value. |
In this example, we will move a file from the user's temporary directory to %AppDir%. We are moving this file on reboot because it is our main executable and it was probably running during the installation.
Source (full path): %TempDir%\MainRun.exe
Destination (full path): %AppDir%\MainRun.exe
See Also: Alphabetical List of Actions, Categorical List of Actions, On Error tab