Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

How to use RegRead with unknown valuenames?

$
0
0

Hi, all!

I'm still an intermediate-level AutoIt v3 coder, and I've come across a problem I don't know how to solve, so I'm looking for some help.

 

I'm trying to use RegRead (and later RegWrite) to read an apparently unusual registry key whose valuenames can't be known in advance.  Besides an empty/null default value, everything else is an arbitrarily-long list of REG_SZ strings whose value "names" are  arbitrary strings!

 

In other words, the registry entry looks like this:

 

HKEY_USERS\blahblahblah\FunkyKey
    (default)              REG_SZ    (value not set)
    ArbitraryValueName1    REG_SZ    "stuff1"
    ArbitraryValueName2    REG_SZ    "stuff2"
    ...
    ArbitraryValueNameN    REG_SZ    "stuffN"

 

Obviously, since the value names can't be known in advance, I can't possibly supply the second argument to RegRead(), which is supposed to be the value's name.  Somehow, I would need to read the key's value names in order to get the key's value names!  (There's a hole in that bucket...)

 

I was hoping that I could somehow read the registry key as a large string of zero-delimited substrings and then use StringSplit() to turn it into an array of strings that I could work with, but there's no way to call RegRead() to do that (since I can't specify the second argument).

 

So I'm completely stumped.  Does anyone have any suggestions?

 

Thanks!

 

 

ETA: For what it's worth, I tried calling RegRead() with the first argument set to "HKEY_USERS\blahblahblah" and the second argument (valuename) as "FunkyKey" just out of desperation, but that didn't work...


Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>