1.

Solve : batch file that awnser for u... possible??

Answer»

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


//redIf you try and right in a different syntax, this should give the OPTION of answering.write a y in the file answerl.txt and it will do it.

format a: /q
hope this helps
uliQuote

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!


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

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



Discussion

No Comment Found