How to Exit Windows and
Come Back Where You ExitedKeywords: exit windows
Question:
I am firing off setup programs with WinBatch, and one of those setup programs requires a Windows reboot. I want my Winbatch app to continue its functions after the reboot. Much like how IE5 continues its installation after a reboot. Is this possible? How to?Answer:
You need to run two scripts for this.The first one automates all the IE5 installation, and the 2nd Winbatch script reads the WIN.ini file and places the 2nd WBT into the Load= line (or you could load it into the RunOnce part of the registry) so that it is run at next bootup.
The second one starts up once the machine is rebooted and continues on its merry way.
First.WBT FirstLoad=IniRead("windows", "load", "") ;save the original setting in www-prod.ini IniWritePvt("Windows", "load", firstload, "www-prod.ini") file=StrCat( firstload," ", FileNameShort("c:\aardvark\winbatch\exittest.wbt")) ;build the line IniWrite("windows", "load", file) ;write the new line in. IntControl(12,0,0,0,0) ;Turn off the Whine Patrol IntControl(66, 0,0,0,0) ;Exit Windows Exittest.WBT ; read the line previously saved. firstload=IniReadPvt("Windows", "Load", "", "www-prod.ini") IniWrite("Windows", "Load", firstload) ;write the old line back in.Question (cont'd):
Does the second script get fired after logging into the Novell network, or does it occur right away on system restart?Answer:
I think it is run at the same time the programs in the startup group are run, after the logon completes.
Article ID: W13313Filename: Exit Windows Come Back Same Place.txt