I have noticed a bug in the Get Registry Subkey script command. When using this command to retrieve the name of the subkey (by providing the index number), it will skip over ANY subkey if that subkey’s name begins with the at symbol (@). I’ll show you a quick example below.
First of all, let’s say these entries below are in the registry:

HKEY_CURRENT_USER
> AppEvents
> Console
> SoftwareCatalog
> .NET Framework
> @Risk 6.2
> AskToolbar
> BatmanBegins



So if I run the following Get Registry Subkey script command, I should get a return value of “4” placed into the %TMP_NUM_SUBKEYS% variable.

Set Variable %TMP_NUM_SUBKEYS% to FUNCTION: Get Registry SubKey (“0”) from HKEY_CURRENT_USER\SoftwareCatalog

If I then issue the Get Registry Subkey script command below to get the 1st subkey’s name under HKCU\SoftwareCatalog, this command will return a value of “.NET Framework” into the %TMP_SUBKEY_NAME% variable.

Set Variable %TMP_SUBKEY_NAME% to FUNCTION: Get Registry SubKey (“1”) from HKEY_CURRENT_USER\SoftwareCatalog

Now, here’s the bug . . . If I then issue the Get Registry Subkey script command to get the 2nd subkey’s name under HKU\SoftwareCatalog, this command will return a value of “AskToolbar” instead of the “@Risk 6.2” that I would expect. (That is a real software application’s name, by the way.)

Set Variable %TMP_SUBKEY_NAME% to FUNCTION: Get Registry SubKey (“2”) from HKEY_CURRENT_USER\SoftwareCatalog

The command seems to act as if the 2nd subkey does not exist because its name began with a “@” symbol. It doesn’t seem to mind if the @ symbol is anywhere else in the name, only if it’s the first character in the name.