|
Answer» I did run a search and saw the post by Sidewinder but I added yes to the batch file but it didn't work.
I have a batch file that copies a bunch of files to a computer for a hot swap. A couple files need to be run to make the computer ABLE to run the data acqusition program. The lines I have in the batch file that I am wondering about are:
C:\Pitram\DualScreen.reg ECHO Yes C:\Pitram\Transfer.reg echo Yes
I'm pretty new to all of this batch file stuff. So I don't know if I am even using the right syntax/format. All I want it to do is run those reg files and answer yes, otherwise the dispatcher will have to click yes on the windows that will pop up. Which isn't a big deal but it would be nice to have the batch file do it for them.
Any comments are appreciated!
Thanks
PeteNot all programs are written to accept parameters from the command line.
You could try using the pipe:
echo Yes | C:\Pitram\DualScreen.reg echo Yes | C:\Pitram\Transfer.reg
Beware that not all programs will accept info from the pipe, but it's worth a try.
Good luck. Thanks Sidewinder for the help but it didn't work.
Is there a command that works like hitting enter?
Thanks!
PeteIs it necessary to type Yes and No all spelled out or are we talking about Y and N?
When sending info thru the pipe, it's necessary to echo exactly what is expected.
FYI: echo. will send an enter key with no data
Hope this helps. hello,
i am also new to these batch stuff and i was also searching for the same thing.
the echo Yes | C:\Pitram\DualScreen.reg does not work.
but is it possible to just create a new registry from the batch file its self.
so that there is no need to create a .reg file.
pleas help YES FINALLY....
i found a way to create a REGISTERY without using the *.reg file.
the syntex is like this: reg add HKLM\(path) /v (Key Name) /t (key type) /d (the VALUE )
HKLM : HKEY_LOCAL_MACHINE HKCU: HKEY_CURRENT_USER ETC i wanted to create a reg key for counter-strike. so that i dont have to enter the serial key of the GAME when i install the game.
my command will be like this
reg add hkcu\software\valve\half-life\settings /v valvekey /t reg_sz /d 5RP2E-EPH3K-BR3LG-KMGTE-FN8PY
if you still have any questions then type the following in command prompt reg/?
|