Click to See Complete Forum and Search --> : DOS bat file help


LrdQimboc
August 15th, 2001, 01:41 PM
Hello all,
I have need of your collective DOS expertise. I have several hundred computers onsite and I need to make a change to each of their autoexec.bat files. Its just one line that needs to be added but the number will change for every pc.
Could any of you direct me to some online help that would tell me how to write or find a script that would insert a line to the autoexec and prompt me for one variable?

cookin chef
August 16th, 2001, 12:26 AM
Haven't used many DOS commands in a while, hopefully this will help.

When you need to add or remove something in the autoexec file, use the edit command.
ex) edit c:\autoexec.bat
Then type in the proper script you want to use and save it before exiting out.

Geek #1
August 16th, 2001, 03:49 AM
Bohr - I think he is looking for a generic script that can update each PC, but will prompt for the number on each PC.

Ohhh, nasty one. Do you have a network, it would be easier to do it as part of the login script.

What is it exactly you wish to add or change??

LrdQimboc
August 16th, 2001, 07:41 AM
Yes, I have an NT network. Your right, every computer has an individual number. I had hoped, rather than having to manually alter the autoexec on each PC to be able to do it with a script I could run from a floppy, or even over the network.

xt477
August 16th, 2001, 09:27 AM
This will add the new line at the end of the autoexec.bat file, or begining if you reverse the copy command. You can add it to the middle somewhere but you would have to use edlin. Assuming here that your running from a floppy. Otherwise just change the path statements

Create a txt file with the line you need added.

@echo off
ren c:\autoexec.bat autoexec.bkp
copy c:\autoexec.bkp+A:\line.txt c:\autoexec.bat
echo ALL DONE

cookin chef
August 16th, 2001, 11:23 PM
[quote]Originally posted by Geek #1:
<strong>Bohr - I think he is looking for a generic script that can update each PC, but will prompt for the number on each PC.

Ohhh, nasty one. Do you have a network, it would be easier to do it as part of the login script.

What is it exactly you wish to add or change??</strong><hr></blockquote>

DOOOOOOHHHHHHH!!!!!!!!

:(

Eagle PC Diagnostech
August 17th, 2001, 12:21 AM
Try this link


<a href="http://www.maem.umr.edu/~batch/batchtoc.htm" target="_blank">http://www.maem.umr.edu/~batch/batchtoc.htm</a>

Geek #1
August 17th, 2001, 04:08 AM
Sorry Bohr, I wasnt' getting at you. When I first read your message it didn't click, but after re-reading, I now know what you meant.

LrdQimboc
August 17th, 2001, 06:44 AM
Thanks for your suggestions. Been a big help and cut down on the amount of time I have to spend on each system.