Q: I'm trying to create a script to retrieve all the values under the HKEY_CURRENT_USER\\Software\Microsoft\WindowsNT\CurrentVersion\Devices registry subkey. I need to fetch each value name and its corresponding data and store this information in a Dictionary object or an array for later comparison. I tried using the Windows Script Host (WSH) Shell object's RegRead method, but RegRead requires that I know the name of each target value. In this case, I don't know the names because they can be different for each user. I thought I found a solution when Google pointed me to a Microsoft TechNet script that enumerates registry values and types (http://www.microsoft.com/technet/
community/scriptcenter/registry/
scrreg08.mspx). However, this script only retrieves each value's name and data type; it doesn't return the data assigned to each value. Can you help me enhance the script so that it also returns the data?
I'd be happy to. But before I do, let me take a moment to comment on your approach for the benefit of our fellow scripters. I like the fact that, rather than starting your script from scratch, you did your homework by locating some boilerplate code to help get you started. That's a very smart approach, and I encourage all scripters to use it whenever possible. Keep in mind that when you want to automate a routine task, there's a good chance someone has already been down the same path. For this reason, few tools are more valuable than a good search engine when you want to avoid creating scripts from scratch. . . .

