batch file script

Sharky Forums


Results 1 to 2 of 2

Thread: batch file script

  1. #1
    Catfish
    Join Date
    Oct 2002
    Posts
    141

    batch file script

    Hey all,
    I have four programs that I might have to install when we get a new computer. I cannot create an image as the company is not big enough to warrant spending the money on the software for how little it would be used (I get two or three computers at a time, with different hardware). I have to install two programs on all the computers, and the other two programs depending on who gets the computers. I currently have four .bat files that do this (along with some other file system changes, copying and deleting), one for each combination. What I would like to do is create a script that will take switches on the command line and copy the required files, and install the other programs according to the switches (possibly /r for to install Adobe Reader since some of the computers have the full Acrobat, and others don't have any). Does anyone know how this could be done using batch files (.bat) in Windows XP? If not using .bat's, can anyone point me to some good VBS or similar language sites that will show me how to do this? I have a little experience in VB, C++, and Java.
    Thanks,
    Danny

  2. #2
    Great White Shark
    Join Date
    Nov 2000
    Posts
    21,595
    Here is a simple batch file script.

    Under each option label you can put your existing commands or a CALL statement to process other batch files. The option you want is a number following the name of the batch file. For example Test 4 to use option 4.

    :p0
    rem Put valid option checking here
    goto :p%1
    exit

    :p1
    echo option1
    goto :eof

    :p2
    echo option2
    goto :eof

    :p3
    goto :eof
    echo option3

    :p4
    echo option4
    goto :eof

Posting Permissions

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