Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: batch file that awnser for u... possible?  (Read 2328 times)

0 Members and 1 Guest are viewing this topic.

redhawk

    Topic Starter


    Rookie
    batch file that awnser for u... possible?
    « on: January 11, 2006, 05:33:39 AM »
    hi all!

    im writing a simpel script for making a boot disk.

    first line is "format a: /q"

    in this command follows "press retun to continue" and other commands have "yes" & "no" awnsers...

    is there a way tellin the script to awnser for u ?

    this is my file

    cls
    @echo off
    type info.nfo
    @echo on
    format a: /q
    XXXXXXX.exe
    copy XXXXX.ini a:




    thanx


    //red

    Perfect Agent52



      Hopeful
    • Give them nothing, but take from them everything
      Re: batch file that awnser for u... possible?
      « Reply #1 on: January 11, 2006, 08:01:50 AM »
      If you try and right in a different syntax, this should give the option of answering.
      HP Pavilion A6010n
      Intel Core 2 Duo E4300 1.80 ghz
      XFX Nvidia 7600gt PCI-E graphics card
      2 GB Kingston DDR2 SDRAM PC4200
      Antec 500W PSU

      uli_glueck

      • Guest
      Re: batch file that awnser for u... possible?
      « Reply #2 on: January 11, 2006, 10:07:29 AM »
      write a y in the file answerl.txt and it will do it.

      format a: /q  <answer.txt

      hope this helps
      uli

      redhawk

        Topic Starter


        Rookie
        Re: batch file that awnser for u... possible?
        « Reply #3 on: January 12, 2006, 05:41:46 AM »
        Quote
        write a y in the file answerl.txt and it will do it.

        format a: /q  <answer.txt

        hope this helps
        uli


        good tip!  8-)

        now is it possible to make the script get an awser from a specific row on "answer.txt".
        that way i can have "y" and "n" on lines 1,2. and switch between em..

        another question. how do i make the script fetch the  [enter], [return],  button/commads...?

        for use in awsering the "press return to continue" or "press any key" prompts

        thanks for all tips guys!



        uli_glueck

        • Guest
        Re: batch file that awnser for u... possible?
        « Reply #4 on: January 12, 2006, 02:40:42 PM »
        To get enter / return hit it before you save the *.txt file.

        To switch between the lines you can read it out with  find in a for loop.
        To choose use if...else...

        Where is the sense to choose, when you first automate it?

        uli
         

        redhawk

          Topic Starter


          Rookie
          Re: batch file that awnser for u... possible?
          « Reply #5 on: January 13, 2006, 01:02:15 AM »
          Quote

          Where is the sense to choose, when you first automate it?

          uli
           


          well in my job i make tons of these bootdisks. as u se first of i format the disk, then i load the progg that makes the image, and last i replace a "ini" file with a preconfigured  one.

          cls                 =clears screen  ::)
          @echo off        =helps the start of script look sweet  ;D      
          type info.nfo     = prints info about the script, in case anyone else at work need to use it.
          @echo on           =helped the start look sweet  ;D    
          format a: /q            =runs the format command
          Fl_sco5c_228.exe        =runs the image loader
          copy getinput.ini a:      =copys the "ini" file

          now the script already saves me much time but if i could manage it to awnser when prompted i would be glad!   hope u get the sense uli  8-)

          redhawk

            Topic Starter


            Rookie
            Re: batch file that awnser for u... possible?
            « Reply #6 on: January 13, 2006, 04:32:59 AM »
            hi all!

            wanted to say that i have solved the script now.

            cls
            @echo off
            type info.nfo
            @echo on
            format a: /q /y       "the /y commad worked fine ;D
            XXXXXX.exe a:   "dicovered tha puttin an "a:" after the image loader command
            copy getinput.ini a:   "would load the image without prompting  


            thanx for all the help guys!

             ;D ;D ;D ;D