Jump to content

"Speed-up" Registry-key search...


MariusN
 Share

Recommended Posts

Hi Scripters...I just want to enquire some knowledge here...Is it possible to speed-up a registry search when searching for a specific key? ie I have a script (partly of course) --->

$I = 1
While 1
  $KEY = RegEnumKey($STARTKEY, $I)
  If @error <> 0 Then ExitLoop
  GUICtrlSetData($INFO_TEXT, $STARTKEY & "\" & $KEY)
  $Z = 1
  While 1
   If _IsPressed($pressed) Then Return
   $VAL = RegEnumKey($STARTKEY & "\" & $KEY, $Z)
   If @error <> 0 Then ExitLoop
   $sKey = ($STARTKEY & "\" & $KEY & "\" & $VAL)
   If StringInStr($VAL, $SEARCHVAL) Then _RegJump($sKey)
   $Z = $Z + 1
  WEnd
  If $KEY = "v2.0.50727_32" Then
   $sKey = ($STARTKEY & "\" & $KEY)
   _RegJump($sKey)
  EndIf
  SEARCHREG($STARTKEY & "\" & $KEY, $SEARCHVAL)
  $I = $I + 1
WEnd

The reason for asking, is i tried Registry Crawler (Shareware) and it found keys 10x quicker than my code...Can it be because it has multi-threading -code in "Registry Crawler" itself that's the reason for the quich search, or is there a way of "boosting" my code?

PS:I added the "ProcessSetPriority = 5" to speed things up a bit, but it;s still on the slow side...

Thx fella's :graduated:

Edited by MariusN
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...