DOS bat file help
Results 1 to 9 of 9

Thread: DOS bat file help

  1. #1
    Junior Member
    Join Date
    Aug 2001
    Location
    MA
    Posts
    3

    Post DOS bat file help

    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?

  2. #2
    Registered User cookin chef's Avatar
    Join Date
    Jul 1999
    Location
    Saskatoon, SK.
    Posts
    1,159

    Post

    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.

  3. #3
    Registered User
    Join Date
    Apr 2001
    Location
    Sunderland, North East of England
    Posts
    423

    Cool

    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??

  4. #4
    Junior Member
    Join Date
    Aug 2001
    Location
    MA
    Posts
    3

    Post

    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.

  5. #5
    Registered User
    Join Date
    Dec 1999
    Location
    Columbus Ohio U.S.A.
    Posts
    194

    Post

    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

  6. #6
    Registered User cookin chef's Avatar
    Join Date
    Jul 1999
    Location
    Saskatoon, SK.
    Posts
    1,159

    Post

    [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!!!!!!!!


  7. #7
    Registered User
    Join Date
    Jun 1999
    Location
    Las Vegas, Nevada
    Posts
    1,109

    Post

    Try this link


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

  8. #8
    Registered User
    Join Date
    Apr 2001
    Location
    Sunderland, North East of England
    Posts
    423

    Cool

    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.

  9. #9
    Junior Member
    Join Date
    Aug 2001
    Location
    MA
    Posts
    3

    Post

    Thanks for your suggestions. Been a big help and cut down on the amount of time I have to spend on each system.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •