Command Reference

Run on Reboot

Tells Windows to run a program the next time the system is rebooted. The file will only be run one time (for one reboot). It will not run on subsequent reboots.

This is accomplished by making an entry in the "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce" Registry key. On Windows NT/2000/XP, the user must be logged in with the proper Registry writing privileges in order for this action to work.

Action ID: 76
Action Category: Reboot

Settings

File to run

The full path and filename of the file to run.

Command line arguments

Any command line arguments that should be passed to the program when it's run.

Return Values

Value
(%LastErrorNum%)

Simple Message
(%LastErrorMsg%)

Verbose Message
(%LastErrorDetails%)

0 (OK)

OK

 

1

Failed run file on reboot command.

Could not open key.
<<File to run>>

2

Failed run file on reboot command.

Could not set value.
<<File to run>>

Example

In this example, we will launch the program "MainRun.exe" that we installed, the next time the user's system is started.

Note: %AppDir% is a built-in variable.

File to run: %AppDir%\MainRun.exe
Command line arguments:

 

See Also: Alphabetical List of Actions, Categorical List of Actions, On Error tab