Any application(s) can be run after an INF is executed by adding entries to the "Runonce" registry key. After the INF is executed, if the Runonce registry key has any entries in it, the programs listed in it will be executed. If executing the INF necessitates the need for a system reboot, the programs will be run after the system has been rebooted.
The Runonce key allows programs to be launched one time in Windows, ensures either symmetric or asymmetric launching of the programs (either runs silently or displays that program among the list of other items to be run), and then deletes the reference to the program so it will not be run again.
To run programs silently with no additional user interface, add descriptionstring=commandline entries under the following key:
To run programs that synchronously under the Windows 95/98/ME Runonce manager, add description-string=command-line entries under the following key:
following example shows an AddReg section that will cause myapp.exe (located in the Windows directory) to be launched with no
user interface, and will cause test.exe (located in the System directory) to be launched with the Windows 95/98/ME Setup
user interface displayed
Note that the description-string under the Setup key is used in the user interface.
If you would like to populate the RunOnce branch using an INF, you cannot right-click on the INF and choose "Install." The command you place into the RunOnce branch will execute immediately.
Instead, use "Active Install" when you right-click. If you have Internet Express installed, this selection is available to you. If not, and you have IE3 installed, run the following reg file:
Active Install Registry Keys
This will install the keys needed to launch Active Setup when you right-click on an INF. Just choose "Active Install," and your INF will populate the RunOnce branch. Upon reboot, RunOnce will operate normally.