Sometimes it can be useful to let a program run automatically
when Windows starts. With our setup tool
SamLogic Visual
Installer it is possible to achieve this by adding a single
line to the Registry tab in the Visual Installer editor.
You can choose if you want the program run automatically only
the next time Windows reboots or if you want the program run
automatically every time Windows starts. In the tip below we will show how
to make a program run automatically the next time Windows is
started.
How to run a program
automatically when Windows starts: |
In the step-by-step example below we will show how to make
Notepad in Windows launch automatically the next time
Windows starts. Follow the steps below:
1. Start Visual Installer and create a new project.
2. Open the Registry tab.
3. Type the following line in the big input box in the Registry tab:
KEY_STARTUP_RUNONCE: Notepad =%WINDIR\Notepad.exe
4. Create a setup package via File - Create setup
package.
If you run the installation and then reboot the computer,
Notepad in Windows will be launched during the Windows
startup process. But if you reboot the computer once again,
Notepad will not be launched again. It will only be launched
one time, at the first reboot.
But it is possible to make Notepad, or other program, to launch
everytime Windows starts. If you use a special key with the name
KEY_STARTUP_RUN instead of KEY_STARTUP_RUNONCE,
like this:
KEY_STARTUP_RUN: Notepad =%WINDIR\Notepad.exe
Windows Notepad will be run everytime Windows starts.
More
information
You will find more information about KEY_STARTUP_RUN and
KEY_STARTUP_RUNONCE, and other special keys, in the help
documentation for Visual Installer. If you have the Registry
tab opened, you can press the [?] button in the button
toolbar to open the section of the help documentation that
covers the Registry tab. You can also open our
User's Guide and jump to the Special variables, commands
and keys section to read more about this topic.
|
|