Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

AUTOEXEC.BAT: Must I reboot to run it? (Users)

posted by CluelessInSeattl(R), Seattle, USA, 31.12.2012, 16:00

Can I make a change in my AUTOEXEC.BAT file and then just run the revised file, without rebooting the machine?

I'm running MS-DOS 6.21 along with DOSSHELL from DOS 5.0. So I have a number of programs running under DOSSHELL. I also have a RAM disk with a lot of files on it. I usually leave the computer on in sleep mode, so that I don't have to reboot it each time I want to use it.

I'd like to test a modified AUTOEXEC.BAT file, without having to go the the trouble of rebooting my machine, reloading all my programs under DOSSHELL, and copying all my files from floppies onto the RAM drive.

Would I be risking messing up my system if I were to make a minor change in the AUTOEXEC.BAT file, and then just run it from a DOS prompt under DOSSHELL?

The change I want to make in the AUTOEXEC.BAT file is a simple one. All I want to do is remove the /p switch from the this line:


Now that I think of it, maybe all I have to do create a .BAT file containing a revised SET DIRCMD line. That makes more sense, doesn't it?

Or, could I even just run the SET command from the DOS prompt? Or will DOS only recognize it if it's contained in an AUTOEXEC.BAT file?

Will in Seattle
a.k.a. "Clueless"

If you're wondering what the back story to my query is: I've spent the last week or so trying to debug an old QuickBASIC program I wrote well over a decade ago.

It used to run OK back when I wrote it in the 90s, but when I recently cranked up my ancient MS-DOS system again and tried to run it, that program would just lock up.

After a week of head scratching, and lots of consultations over at a QBasic and QB64 Discussion Board I stumbled on the solution to the problem:

Somewhere along the line, way back when, I had added SET DIRCMD=/o/a/p to the AUTOEXEC.BAT file I had been running on my old (and now, long since, dead) laptop.

When I revived my old MS-DOS and QuickBASIC projects this year, I just copied over the AUTOEXEC.BAT file containing that SET DIRCMD line from the hard drive of that old dead laptop

I had long since forgotten about that SET DIRCMD line in that AUTOEXEC.BAT file.

Well, it turned out that the very first action my my old .BAS file performed was SHELL "DIR>FILE.LST"

And then it opened the FILE.LST file to extract the names of the files, open each file, and then extract the first line of each file. Of course it choked when it it came across the line: "Press any key to continue . . ." Because no such filename exists in MS-DOS.


Complete thread:

Back to the forum
Board view  Mix view
15275 Postings in 1373 Threads, 253 registered users, 14 users online (0 registered, 14 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum