[archive] reg_query_value

[Migrated content. Thread originally posted on 25 January 2007]

I want to retrieve the name of the default email client (just the name, I don't want to actually launch it) found in the registry at:

HKLM\Software\Clients\Mail

So I have the following call:

CALL "REG_QUERY_VALUE" USING HKEY_LOCAL_MACHINE,
Q-RESULT,
Q-RESULT-SIZE,
Q-SUBKEY
GIVING Q-STATUS.

But I think it's trying to bring back every entry under that subkey, because I get a status of 234 which means that the result is too large for Q-RESULT.

Is there a way to only get the (Default) data value (i.e. "Outlook Express" in this case)? Or do I have to somehow enumerate the results?