Computing.Net > Forums > Disk Operating System > modify autoexec.bat

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.

modify autoexec.bat

Reply to Message Icon

Name: glenn
Date: April 28, 2003 at 11:04:01 Pacific
OS: DOS
CPU/Ram: 550MhzAMD-256
Comment:

I would like to edit the autoexec.bat on my win98 boot floppy so that it changes directly to the 'd:'drive and execute either a .bat or an .exe.

I have added this to the end of my autoexec.bat
d:\
file.bat

That dumps me to the d:\ prompt but does not run the .bat file I have there. I can type 'batchfilename' though and it will work. I'm close but apparently the syntax is getting the better of me.

Thanks for any help folks.



Sponsored Link
Ads by Google

Response Number 1
Name: Miskva
Date: April 28, 2003 at 12:38:46 Pacific
Reply:

Weird, it must says (or do) something when it comes to the line where you specified that batch program ...

just run it from dos, take out the "echo off" command, to see what he is doing exactly

by the way, the command to switch to D: drive is :

D:

not

D:\

and also, calling a batchprogram may be done by :

call somefile.bat

in stead of

somefile.bat

(depends on what DOS you are running), if this command is the latest in the list, it doesnt matter, but otherwise it does


0

Response Number 2
Name: trekker_jas
Date: April 28, 2003 at 14:42:29 Pacific
Reply:

Actually there are a few ways to try this, but it can depend on your OS. For example, if you are running DOS (as in a boot disk) then you could easily have a command at the end of the autoexec.bat file such as this: d:\runthis.bat
With Windows 9x it works the same, but Windows may still try to load. In that case, if you do not want Windows to load then you must use the EXIT command.
The "call" command can also be used as Miskva explained. Using the "call" command will allow the batch file to return from where it came (returns to the batch file that called it). Not using the call command will not return it to the original batch file.


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 Disk Operating System Forum Home


Sponsored links

Ads by Google


Results for: modify autoexec.bat

Sample CONFIG.SYS and AUTOEXEC.BAT www.computing.net/answers/dos/sample-configsys-and-autoexecbat/6700.html

autoexec.bat and Config??? www.computing.net/answers/dos/autoexecbat-and-config/14821.html

Force WinME to read autoexec.bat. www.computing.net/answers/dos/force-winme-to-read-autoexecbat/14202.html