Difference between revisions of "AUTOEXEC"

From DOSBoxWiki
Jump to navigationJump to search
(Removed erroneous info specifying the location of the dosbox.conf file, extraneous info)
(starting MSDOS is not a common autoexec :))
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
 
Upon BOOT, the original MS-DOS system would first load settings from a file called CONFIG.SYS, and then execute any commands found in the '''AUTOEXEC.BAT''' file.  Commonly the AUTOEXEC.BAT file would define the system [[PATH]], load device drivers, and launch [[Software:Windows|Windows]].  Because DOSBox already emulates most of what a CONFIG.SYS, and AUTOEXEC.BAT would do, there isn't much need to define anything other than your mountable drives.
 
Upon BOOT, the original MS-DOS system would first load settings from a file called CONFIG.SYS, and then execute any commands found in the '''AUTOEXEC.BAT''' file.  Commonly the AUTOEXEC.BAT file would define the system [[PATH]], load device drivers, and launch [[Software:Windows|Windows]].  Because DOSBox already emulates most of what a CONFIG.SYS, and AUTOEXEC.BAT would do, there isn't much need to define anything other than your mountable drives.
  
In DOSBox, '''AUTOEXEC.BAT''' is a segment of the [[dosbox.conf]] file.
+
In DOSBox, '''AUTOEXEC.BAT''' is a [[Dosbox.conf#sections |section]] of the [[dosbox.conf]] file.  The section is labeled as '''[autoexec]'''.
  
 
== A Common AUTOEXEC.BAT ==
 
== A Common AUTOEXEC.BAT ==
Line 8: Line 8:
 
  C:
 
  C:
 
  CLS
 
  CLS
  ECHO Starting MS-DOS 6.22...
+
  ECHO Hello world...
 
 
 
This '''AUTOEXEC.BAT''' file [[MOUNT|mounts]] a [[CDrive|C drive]] (pointed to the Local-Directory C:\DOSGAMES), changes to that drive (from [[ZDrive|Z:]]), [[Commands#CLS|Clears the Screen]] and prints the message
 
This '''AUTOEXEC.BAT''' file [[MOUNT|mounts]] a [[CDrive|C drive]] (pointed to the Local-Directory C:\DOSGAMES), changes to that drive (from [[ZDrive|Z:]]), [[Commands#CLS|Clears the Screen]] and prints the message
  
  Starting MS-DOS 6.22...
+
  Hello world...
  
 
(The message that MS-DOS printed immediately before loading the '''CONFIG.SYS''' and '''AUTOEXEC.BAT''').
 
(The message that MS-DOS printed immediately before loading the '''CONFIG.SYS''' and '''AUTOEXEC.BAT''').

Latest revision as of 09:02, 31 October 2009

Upon BOOT, the original MS-DOS system would first load settings from a file called CONFIG.SYS, and then execute any commands found in the AUTOEXEC.BAT file. Commonly the AUTOEXEC.BAT file would define the system PATH, load device drivers, and launch Windows. Because DOSBox already emulates most of what a CONFIG.SYS, and AUTOEXEC.BAT would do, there isn't much need to define anything other than your mountable drives.

In DOSBox, AUTOEXEC.BAT is a section of the dosbox.conf file. The section is labeled as [autoexec].

A Common AUTOEXEC.BAT

@ECHO OFF
MOUNT C C:\DOSGAMES
C:
CLS
ECHO Hello world...

This AUTOEXEC.BAT file mounts a C drive (pointed to the Local-Directory C:\DOSGAMES), changes to that drive (from Z:), Clears the Screen and prints the message

Hello world...

(The message that MS-DOS printed immediately before loading the CONFIG.SYS and AUTOEXEC.BAT).

MOUNT C C:\oldgames C: