# autoexec.bat / config.sys



## icarly (Aug 29, 2008)

I am new to batch files, and just started learning.
But simple things seem confusing.

I can do simple batch files, but i did not know windows xp doe's not use the AUTOEXEC.BAT OR THE CONFIG.SYS FILE.

This book i have just started reading "the concise guide to ms-dos batch files" must be a few years old.

It was telling me where i can view the contents of these files which was 
( c:\ type \autoexec.bat)
(c:\ type \config.sys)

After spending ages trying to find them, only to find out that windows xp doe's not use them, so what else will i discover that windows doe's not use, or even bother with.

the book seems fine as what i have done, so far works well so i guess i might be posting quite a few times if examples dont work out.

*my question was , why doe's windows xp not use these files *


----------



## TheOutcaste (Aug 8, 2007)

Welcome to TSG!

Windows XP (and all other NT based version of Windows, NT/Win2000 and later) don't use those files because they don't use MS-DOS. 
The Command Prompt (cmd.exe) is similar to MS-DOS, and has many of the same commands, but what's under the hood is very different.

If you have an Autoexec.bat file in the root of the boot drive, NT based versions of Windows (and WinME as well) will ignore any commands in it, though they will read Set statements to define variables, and the path statement.

If you need to configure an emulated MS-DOS environment for an MS-DOS program, you can use autoexec.nt and config.nt, which are found in %windir%\System32. You can have different autoexec.xx and config.xx files for each MS-DOS program you want to run, just specify the file name in the MS-DOS programs PIF file (Advanced button on the Programs tab).

Search Windows help for autoexec.nt and PIF for more info.

Many older MS-DOS files use the CHOICE command. WinXP doesn't have that, but you can copy the choice.com file from an Win9X system and use it. Not recommended unless your files are only going to be used on your system, as you'll have no way of knowing if a system has that file or not.

Here's some useful links:

DOS and VB Scripting Links



Command-line reference A-Z
 Using batch parameters
 Windows 95/98/ME Batch file Tutorial (Still a good basic reference for WinNT/2K/XP)
 Batch File Functions for NT4/2000/XP/2003
 Rob van der Woude's Scripting Pages
 
HTH

Jerry


----------

