RegistryEnumKeys Issue?

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
dtaylor
Junior Coder
Posts: 47
Joined: Mon Aug 08, 2016 2:42 am

RegistryEnumKeys Issue?

Post by dtaylor » Fri Aug 12, 2016 4:21 am

When I run the RegistryEnumKeys sample code from the Help file.

Code: Select all

RegistryEnumKeys>HKEY_CURRENT_USER,Software\MJTNET,keys
MessageModal>keys
Separate>keys,CRLF,keysArr
I get the following results in the Watch List:
0: KEYSARR_COUNT=4
0: KEYSARR_1=Software\MJTNET\MSched
0: KEYSARR_2=Software\MJTNET\Msched14
0: KEYSARR_3=Software\MJTNET\WebRecorder
0: KEYSARR_4=

My question is why does the COUNT show 4 when there are clearly only 3 values (also confirmed by manually checking the registry)? Is this a bug or is it intended?

Any insight is greatly appreciated.

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: RegistryEnumKeys Issue?

Post by Marcus Tettmar » Mon Aug 15, 2016 2:38 pm

The empty one would be the (Default) entry which has no name and in this case no value.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

dtaylor
Junior Coder
Posts: 47
Joined: Mon Aug 08, 2016 2:42 am

Re: RegistryEnumKeys Issue?

Post by dtaylor » Mon Aug 15, 2016 6:05 pm

Not how my brain thought it should be, but many thanks for the explanation.

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts