• RSS
  • Twitter
  • FaceBook

How to Set a Registry Entry on Multple Computers?

This article explains how you can use FOR loop to set a registry entry on computers specified in a text file.

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 Nirmal Sharma

Nirmal is a Microsoft MVP in Directory Services and working as a Technical Architect/Consultant. He has been involved in Microsoft Technologies since 1994 and followed the progression of Microsoft Operating Systems and software. He is specialized in Directory Services, Microsoft Clustering, SQL, MOM, Exchange and Citrix. In his spare time, he likes to help others and write "internal" technical articles, white papers and tips on various Microsoft technologies. You can contact him at nirmal_sharma@mvps.org.


Article not looking right or info is missing? Let us know so that we can fix it: .


Receive all the latest articles by email!

Receive Real-Time & Monthly WindowsNetworking.com article updates in your mailbox. Enter your email below!
Click for Real-Time sample & Monthly sample

Become a WindowsNetworking.com member!

Discuss your network issues with thousands of other network administrators. Click here to join!

Community Area

Log in | Register

Readers' Choice

Which is your preferred data recovery solution?