Jump to content

find registry value in subkey if exsist msgbos subkey name


 Share

Recommended Posts

hello all ....

how are u i hope u are good ... i miss this fourm and autoit it's a long time since i did not code in autoit <3

im trying today to code a script to bring subkeys in HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\

and then check for value in each key the name of value (DisplayName) and check the data for that value if it's is ( InstEd 1.5.15.26 ) then show me msgbox for subkey name under HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\

 

this is my code

lena()
Func lena()
Local $sKey = "HKLM64\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\"
For $i = 1 to 100
    $sSubKey = RegEnumKey($sKey, $i)
        If @error Then
            ExitLoop
        Else
            $sVal = RegRead($sKey & $sSubKey, "DisplayName" )
            If $sVal <> "" Then
            ConsoleWrite($sSubKey & "  | " &  $sVal & @CRLF)



EndIf
        EndIf
Next
EndFunc

i did not know what to do after this the code is work fine it's display the subkeys names and the displayname for each subkey but i need to search in display values if he found (InstEd 1.5.15.26) then show msgbox contain subkey name for that value <3

Link to comment
Share on other sites

StringInStr should work? Here is a snip you can try adding to your code.  Set $findVal to 'InstEd 1.5.15.26' .

 

Local $findVal = "whatever"

            If $sVal <> "" Then
                ConsoleWrite($sSubKey & "  | " &  $sVal & @CRLF)
                If StringInStr($sVal, $findVal) Then
                    MsgBox(0, "Found It", $sSubKey & "  | " &  $sVal)
                EndIf

            EndIf

 

Link to comment
Share on other sites

sorry, pls ignore this answer.

 

I obviously spoiled the original script. I just have a functional EXE compiled.

 

regards, Rudi.

Edited by rudi
script spoiled.

Earth is flat, pigs can fly, and Nuclear Power is SAFE!

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...