How to Set a Registry Entry on Multple Computers?

This article explains how you can use the FOR loop to set registry entry on multiple computers. As an example, you want to enable SFCScan on all computers on your network. This is how you accomplish this:

  1. Create a text file called Comps.TXT
  2. Put all the computer names in it.
  3. Next run the following command from a command window:

FOR /F "Tokens=*" %A IN (Comps.TXT) DO REG.EXE Add "\\%A\HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon /v SFCScan /d REG_DWORD /v 1 /F

The above command runs on all the computers mentioned in the Comps.TXT file and execute the REG.EXE command against each computer mentioned in the Comps.TXT file.


About The Author

Leave a Comment

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Scroll to Top