Jump to content
Sign in to follow this  
Chimaera

RegEnumKey Oddity

Recommended Posts

Chimaera

I was looking at grabbing the keys under the Browser Helper Objects Key and i came across this anomaly

What im heading towards is reading all the keys under this key and saving them to csv

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Browser Helper Objects

Now i started looking for the 2 example keys i could see

Capture.thumb.PNG.c548adb98ec1d29a35c77e

Local $test = RegEnumKey('HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Browser Helper Objects',2)
ConsoleWrite($test & @CRLF)
Local $test = RegEnumKey('HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Browser Helper Objects',5)
ConsoleWrite($test & @CRLF)

and this is how i found the keys but there seems to be more keys hidden here than i can see as No's 1,3,4 also contain keys

Why is this? and is it possible to capture the hidden ones as well?

Share this post


Link to post
Share on other sites
Chimaera

aah theres some more of the little sods :)

If you have to specify a number at the end of the enumKey section am i going to have to do a loop till 100 or something to get them all?

Share this post


Link to post
Share on other sites
jguinch

The loop from 1 to 100 is not necessary (you saw this in the example of the help file, I suppose ?). It can be done like this :

Local $iIndex = 1
Local $sKey = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\explorer\Browser Helper Objects"
Local $sSubKey

While 1
    $sSubKey = RegEnumKey($sKey, $iIndex)
    If @error Then ExitLoop
    $iIndex += 1
    
    ConsoleWrite($sSubKey & @CRLF)
WEnd

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×