Automatic Remote REGEDIT?

Posted by SUPER MARIO BROTHERS on Super User See other posts from Super User or by SUPER MARIO BROTHERS
Published on 2012-03-01T18:04:56Z Indexed on 2012/06/11 16:42 UTC
Read the original article Hit count: 347

I've got a lot of computers on the domain here that do not have remote desktop enabled. I can open the command prompt and do this command:

REG.exe ADD \\[the machine im doing this to]\HKLM\SYSTEM\CurrentControlSet\
Control\\"Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 0

and it works perfectly fine, except for one thing - it makes a prompt asking if I'm sure I want to do this, Yes/No. How would I go about having a batch file auto-answer YES to this, so I don't have to type it every time? It wouldn't be a problem if it was just a couple hundred machines, but there's plenty more than that and it would take a while to do this by hand. Not to mention I might have to sweep a few times to make sure every computer is turned on and is affected by this.

© Super User or respective owner

Related posts about Windows

Related posts about command-line