Computing.Net > Forums > Programming > DOS Batch Line

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

DOS Batch Line

Reply to Message Icon

Name: J.C.
Date: May 10, 2006 at 10:36:44 Pacific
OS: Win98 S.E.
CPU/Ram: 950/CPU 950MB/Ram
Product: Generic
Comment:

I am wanting to add a line to an edited autoexec.bat of a Win98 Boot Floppy. Example: after calling restart.com, I need a line that returns to the next line of code in the Autoexec.bat that is called after the computer reboots.
Thanks



Sponsored Link
Ads by Google

Response Number 1
Name: IVO
Date: May 10, 2006 at 13:39:14 Pacific
Reply:

If I understand you want

1- Autoexec.bat executes till the Restart.com
2- The PC reboots
3- This time the Autoexec.bat has to start with the line just after the Restart.com

As the boot process wipes out the previous environment, a way to achieve that is to set a flag file, i.e.

@Echo OFF
If exist AutoFlag GoTo :REBOOT
.......
.......
Echo REBOOT > AutoFlag
Restart.com
Rem PC Reboots
:REBOOT
Del AutoFlag
......

So next time you will use the floppy your Autoexec.bat will work correctly again.

The above posted if I have understood.


0

Response Number 2
Name: J.C.
Date: May 11, 2006 at 08:45:45 Pacific
Reply:

Thanks, for the info. It's exactly what I need.
J.C.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: DOS Batch Line

DOS - batch variables www.computing.net/answers/programming/dos-batch-variables/15058.html

For loop in DOS batch program www.computing.net/answers/programming/for-loop-in-dos-batch-program/18227.html

Write the following MS-DOS batch fi www.computing.net/answers/programming/write-the-following-msdos-batch-fi/18277.html