Deploying reg key via batch and PSTools

Task: deploy registry key to multiple desktops.

Tools needed: PSTools

1. Download PSTools, unpack and run psexec.exe.

2. Create computers.txt file within PSTools folder.

3. Place your registry key into the shared folder.

4. Open notepad and create run.bat file that will look like this:


regedit /s "\\yourserver\shareddrive\sharedfolder\yourregkey.reg"

then save it within the same folder where you have your yourregkey.reg

5. Open notepad and create start.bat file then save it within PSTools folder


psexec.exe @computers.txt -u domain\yourusername -p yourpassword -c "\\yourserver\shareddrive\sharedfolder\run.bat"

5. Export computers from AD and add them to computers.txt

6. Run.bat



Leave a Reply