Is there a way to have a winbatch script initiate a reboot using the IntControl parm and have control returned to the script AFTER the machine boots?
Reason being, I’m using WinBatch to install a product and I need to do a reboot after installation before beginning the configuration procedures, also via WinBatch.
There are three locations in the registry from which you can launch an application after a reboot:
You can start various applications or events at controlled time in Windows, by dictating when the 32-bit process should be activated. Here is the areas in which you should assign tasks, based on when you want them to start:
– As soon as Windows enters 32-bit mode, these applications/services are started – these are running prior to the logon script, or logon box
– run after a user logs on, after the logon script finishes, but before the desktop is fully loaded in.
– once the logon script is finished, and Windows has loaded the desktop STARTUP folder from the Start Menu – last place Windows starts programs from
Here’s an example (for both Windows 95 and NT):
RegSetValue(@REGMACHINE, "SoftwareMicrosoftWindowsCurrentVersionRunOnce[wbfile]","c:whateverwbapp.exe parm1 parm2 ...")
On the next boot, c:whateverwbapp.exe parm 1 … will be run.
I used a parameter and had wbapp.exe work so that if parm1 existed, to do a goto to that value, eg:
;==============snip==================== ; wbapp.wbt if param0 then goto param1 :Start ... :Reboot ; come back to here after reboot ;==============snip====================
and put the app into RunOnce with the parameter “Reboot”.
RunOnce is a registry key at…
If you write a script like:
and restart windows it ought to:
- Run notepad.exe.
- Remove the registry entry for you.