• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 344
  • Last Modified:

editing autoexec.bat

I´m working in a company where we sell our e- products.For one our product we have a problem ( it´s about e-payment ).In OS Windows 98 we must offten change ( edit ) autoexec.bat because we need to change the path inside it.
Could someone tell me something about autoexec.bat and the path generally, or recommend me some internet site?

Many thanks!!!!!!!
1 Solution
an easy way to edit it is to use msconfig

go to start->run and type

msconfig and select the autoexec.bat tab
or do you want to edit it through like a script?
The path is used by windows when trying to find files
not specified by giving the full path name.

Are you changing path back and forth, or are you changing
it by adding new search directories ?

If the all the directories are known, you should be able
to put them all in the path. You may have to use several path statements, carrying forward the current path using
%PATH%. There used to be a 128 char limitation, but that was removed in win95. There are some minor side effects
when you exceed 256 characters.

For example

path %PATH%;c:\aaa;c:\bbb\ccc
path %PATH%;c:\ddd\eee

Hope this helps :-)
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Hi ahorvat

Here's an excelent site for your info.


The autoexec.bat file is a batch file (meaning executable) which "Executes Automatically" (as the name indicates) every time your computer starts up. It contains a list of DOS commands which are executed sequentially, first line first, last line last. These commands could be necessary to run your computer properly (as in your case). It is usually located in the root directory of your boot drive, usually C:\ (the root directory of the C: drive in your hard disk).

To understand path, lets do it practically:

1. Bring out the MS-DOS prompt by going to "Start > Run" and type "Command" in the "Open" box. Click "OK" and the MS-DOS prompt will be displayed. (You will get "C:\WINDOWS\Desktop" or something like this.)

2. type "echo %path%" and press enter. This will display the current MS-DOS path. By default, it will display the following (if you've not modified it):


This means that MS-DOS (or windows) will search the "C:\WINDOWS" and the "C:\WINDOWS\COMMAND" directory whenever you type a command in the MS-DOS prompt or try to run some programs from Windows.

3. Let me illustrate: Say, your company's program is called "abcview.exe" and you put the program in the "C:\Program Files\ABC" directory. Now, if you just type "abcview" in your DOS prompt, you will get "Bad command of file name" error message from DOS (unless you are already in the "C:\Program Files\ABC" directory). For the program to run, you will need to set the path properly by editing your "autoexec.bat" file.

4. To edit your "autoexec.bat" file, goto "Start > Run" and type "notepad c:\autoexec.bat" in the "Open" box and click "OK". Now, put the line " path=%path%;"c:\program files\abc" " (include the double quotes) at the last line. Now close and save your "autoexec.bat" file. Reboot/Restart your system.

5. To view your changes, bring up the MS-DOS prompt and type "echo %path%" at the command prompt. Now you will get:


Now your program "abcview" will run.

Please note that the path command are usually used by older programs. Most of them will fail to run if not properly set.

Hope this helps you...
ahorvatAuthor Commented:
Thanks, you help me a lot....

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now