Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I have Win95 machines that won't boot after installing a certain software because the installation places a PATH command in the autoexec without referencing the previous paths. Can anyone tell me what I need to do to place another path command in the autoexec from a batch file?
Thanks,

The easiest way to do it is to write a batch file like this:
echo set path=%path%;c:\newpath >> autoexec.bat
That's it! Note that it should be written out on a single line. Also note that it must be run after autoexec.bat, but that shouldn't matter because chances are that will always be the case anyway.
What it does is append a line to end of autoexec.bat that takes the current path and appends c:\newpath (You obviously should set this to what you want the additional path to be in your particular case).
Also note that this batch should be a one shot deal as it will append a line to the end of autoexec.bat every time it is run.
Now that I think about it just combine all the paths in your autoexec.bat. You shouldn't need a batch file at all (If I'm understanding you correctly).
So if your autoexec.bat reads:
set path=c:\dos
.
.
.
set path=c:\duke3dwhat you want to do is combine them into a single line, I.E.
set path=c:\dos;c:\duke3d
Seperate each different directory with a semicolon and you should be good to go.
Hope that helps,
-Michael

Sorry about the two posts, I went to go back and look at it the first time and got a message saying there was no post, so I made a new one.
I tried your first suggestion (just from the command prompt) and it didn't seem to do anything to the autoexec... was there supposed to be something new in there.
I am installing this software on multiple machines (the company that wrote the software probably didn't test it on Win95 machines before release). Now, instead of going in and manually editing all the autoexec's, I want to finish installing the software, run the batch file, and reboot.
The autoexec as the install leaves it:
PATH=c:\foldername
The autoexec as I want it to look:
Path=c:\foldername
Path=%path%\c:\windows;c:\windows\commandor
Path=%path%;c:\folde

for doing that, simply put what michael said on a batch file.
ie::setinput.bat
@echo SET PATH=%path%;C:\WINDOWS;C:\WINDOWS\COMMAND >> autoexec.batThat should add the line "SET PATH=%path%;C:\WINDOWS;C:\WINDOWS\COMMAND" to the end of autoexec.bat
NOTE: BE CAREFUL!!. There are TWO ">" simbols. If you add only one, you'll really mess up the computer.
email:secret_doom@hotmail.com

Forgot to say, all that text in the batch file (begginig with "@echo" and ending with "autoexec.bat" is in the very same line!!!!!!

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |