Sign in to follow this  
Followers 0
MariusN

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

1 post in this topic

#1 ·  Posted (edited)

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

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  
Followers 0