I need to run the following batch file and pass "N" twice. I can figure out how to pass it once, but twice I just can't figure out:
@ECHO OFF
Regedt32 /s registrychanges.reg
echo n | gpupdate /force /sync
shutdown /r /f /t 0
The gpupdate /force /sync requires "N" twice. Even if I do echo n | echo n | gpupdate /force /sync
it just hangs at the prompt for the second n.
Is there actually a way to pass two echo responses in a batch file for the same command?
Thanks!
Create a code block and pipe to the command.
(
echo n
echo n
)|gpupdate /force /sync