Querying HKEY_CURRENT_USER remotely

Querying HKEY_CURRENT_USER remotely

2010-09-08
/ / /

I’m not sure why MS doesn’t allow this to work with their reg.exe program. On most workstations only a single user is logged in anyways…

The above may have truncated (FYI).
Ok, what this does…
1) Sequentially pull computer names from a file (domain-list.txt)
2) Echo that computer name into our master “list” text file
3) Query the HKEY_USERS via the computer name pulled from step 1 and save to a temporary file
4) Execute a findstr that will only search for user accounts (and not CLASS keys) and save to “temp2.txt”.
5) In Temp2.txt, parse and save as variable “%%Z” and execute our reg query and save to our list1.txt file.
You can replace anything with step 5 to do whatever you need (Reg Add/Delete/Query/etc.)

Post a Comment

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

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.