Computer Hope
Microsoft => Microsoft DOS => Topic started by: malshika on September 20, 2009, 02:14:15 AM
-
i have a .exe program i have to run this program automatically. So i can run this .exe file by creating a bat file and schedule windows scheduler, no problem about that. But when i am running this .exe file it prompt a question would you like to continue this program How can i set yes to this .exe file?
Using the .bat file how to automate this process?
-
I don't think this is possible unless it has a switch to suppress prompting.
-
What is the exe file and how does it ask the question? Does it show a "yes" button? Or "Yes" and "No" buttons? More details please!
-
its is a third party product software. i want to take backup using windows scheduler.
i am running (pdm_backup -d -f filename ) as a command then it prompt would u like to continue (y/n):
if i can enter 'y " using a bat file it is great. it will run the backup normally when i enter "y" .
thanks if anybody can help to resolve this poblem great.
-
you could try using a pipe and passing the y through it like this
echo Y | pdm_backup -d -f filename
or
"redirection" from a file
echo Y>y.txt
Y.txt<pdm_backup -d -f filename
-
[UPDATE]
The pipe technique is recommended in this thread here
http://www.helpdeskusers.com/e107_plugins/forum/forum_viewtopic.php?14393
Although they use single quotes around the Y (dunno why) so I suggest trying with and without quotes
echo 'Y' | pdm_backup
-
.
-
Great.Thank you salmon using the first suggestion i am able to take backup without quotes.
Thanks again.
-
Great.Thank you salmon using the first suggestion i am able to take backup without quotes.
Thanks again.
You are very welcome.
-
Nice triple-post salmon.
So, the piped output goes to the first user input, in this case, a confirmation. Is there a way to make it go to the second?
Like for my first user-input, I need to say start, then for the second, it needs to say Y, just like the OP.
-
Nice triple-post salmon.
It's because they changed the buttons around. I intend to hit "modify" and hit "quote" by mistake, and cannot afterwards delete it.
-
So, the piped output goes to the first user input, in this case, a confirmation. Is there a way to make it go to the second?
Like for my first user-input, I need to say start, then for the second, it needs to say Y, just like the OP.
need more info; like what kind of program, and how you are running it etc.
-
It used to be a batch file, now its an EXE.
It basically asks you to begin, it sorts the files then asks you if you want to delete the originals (it copies the files, not moves).
-
It used to be a batch file, now its an EXE.
In that case, I'd rewrite and recompile the batch. Perhaps using passed parameters %1, %2, etc. Piping only works for the first prompt which takes characters from STDIN.
-
Besides piping, you cant send keys to an exe.
-
Except with %1, %2, etc. anyway, no biggie.
-
Except with %1, %2, etc. anyway, no biggie.
That's with batch files, not exe's.
-
Batch files converted to exe?
-
Besides piping, you cant send keys to an exe.
If it is a console .exe which takes input from stdin, you can sometimes redirect stdin like this
program.exe < input.txt
-
Batch files converted to exe?
Exactly.
-
Well yes, but still haven't checked into Batch-To-Exe, from prior testing it had a few bugs.