Solved How can I pass a character and return to a batch file?

December 10, 2012 at 21:10:08
Specs: Windows 7
I have a CMD file that is executing NET STOP Service. The NET STOP command is prompting the user for a Y/N to continue execution. How can I force a "Y" in the batch file so the batch file doesn't stop waiting for input?

See More: How can I pass a character and return to a batch file?

Report •


#1
December 10, 2012 at 21:44:27
i doubt this will work, but:
echo Y | net stop

Report •

#2
December 11, 2012 at 22:52:08
I had tried that before posting... It didn't work... Any other suggestions?

Report •

#3
December 12, 2012 at 19:59:00
✔ Best Answer
net stop service /y

Tony


Report •

Related Solutions

#4
December 12, 2012 at 21:41:24
Thanks! That worked!

Report •


Ask Question