FireFox Posted November 15, 2008 Share Posted November 15, 2008 Hello, How can i search value in regedit with a script ? Is it an UDF for that ? Thanks in advance ! Link to comment Share on other sites More sharing options...
Pain Posted November 15, 2008 Share Posted November 15, 2008 RegEnumKey and RegEnumVal. From here you can start to search with StringInStr or StringRegExp. Link to comment Share on other sites More sharing options...
FireFox Posted November 15, 2008 Author Share Posted November 15, 2008 RegEnumKey and RegEnumVal. From here you can start to search with StringInStr or StringRegExp.Thanks i will try it ! Link to comment Share on other sites More sharing options...
FireFox Posted November 15, 2008 Author Share Posted November 15, 2008 How can i start search with this functions ? for example i want to search the word "java" in the regdir of HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run Thanks for anyhelp if you want to lol... Link to comment Share on other sites More sharing options...
PsaltyDS Posted November 15, 2008 Share Posted November 15, 2008 (edited) RegEnumKey and RegEnumVal. From here you can start to search with StringInStr or StringRegExp.Already assembled into a recursive registry search: _RegSearch() How can i start search with this functions ? for example i want to search the word "java" in the regdir of HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunThanks for anyhelp if you want to lol...For a string return:$sRET = _RegSearch("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "java")For an array return:$avRET = _RegSearch("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "java", 7, True) Edited November 15, 2008 by PsaltyDS Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
FireFox Posted November 15, 2008 Author Share Posted November 15, 2008 Already assembled into a recursive registry search: _RegSearch() Thanks a lot ! Link to comment Share on other sites More sharing options...
FireFox Posted November 15, 2008 Author Share Posted November 15, 2008 $sRET = _RegSearch("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "java") For an array return: $avRET = _RegSearch("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "java", 7, True) Sorry if i'm stupid but how can i know if the value has been found for example : If $sRET=1 Then Msgbox(0,"","Found !") Else Msgbox(0,"","Not Found !") EndIF Link to comment Share on other sites More sharing options...
PsaltyDS Posted November 15, 2008 Share Posted November 15, 2008 Sorry if i'm stupid but how can i know if the value has been found for example : If $sRET=1 Then Msgbox(0,"","Found !") Else Msgbox(0,"","Not Found !") EndIF How about: If $sRET = "" Then MsgBox(16, "No Match", "No match found.") Else MsgBox(64, "Match", "Match found:" & $sRET) EndIf Or, if you use the array return option: If $avRET[0] = 0 Then MsgBox(16, "No Match", "No match found.") Else MsgBox(64, "Match", $avRET[0] & " matches found") For $n = 1 To $avRET[0] MsgBox(64, "Match: " & $n, $avRET[$n]) Next EndIf Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
FireFox Posted November 15, 2008 Author Share Posted November 15, 2008 thanks for your help Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now