Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question
    
Why not create a policy that enables RDP? –  Zoredache Mar 1 '12 at 19:28
    
I don't have much experience or luck setting group policies. I wouldn't know what to do without breaking everything. –  SUPER MARIO BROTHERS Mar 6 '12 at 12:37
add comment

1 Answer

From the output of reg add /?:

/f Force overwriting the existing registry entry without prompt.

Just add that to the end of your command.

share|improve this answer
    
Ah! Thank you - I don't know how I missed that option. Guess I should read things a little more carefully. –  SUPER MARIO BROTHERS Mar 1 '12 at 18:14
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.