Jump to content

Regedit Key Get Value Type Of


ArdaDemir
 Share

Recommended Posts

Biraz araştırma yaptım ve böyle bir örnek buldum, eminim işine yarayacaktır.

$Val = ""

For $i = 1 to 999
$Val &= RegEnumVal("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Ole" , $i)
if @Error <> 0 Then ExitLoop
If @Extended = 1 then $type = "String"
If @Extended = 2 then $type = "Expandable"
If @Extended = 3 then $type = "Binary"
If @Extended = 4 then $type = "Dword"
If @Extended = 7 then $type = "Multi"
If @Extended = 11 then $type = "Qword"
$Val &= " : " & $type & @CRLF
Next

MsgBox(64,"", $Val)
Link to comment
Share on other sites

@ArdaDemir

 

Ufak bir örnek hazırladım. Kurcalarsın....

 

Local $RegValue = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion", "ProgramFilesDir")
Local $Error = @error, $RegValueType = @extended

If $Error = 0 Then ;Varsa
    MsgBox(64,"BlueLife","Value: " & $RegValue & @Lf & "ValueType: " & _Blue_RegType($RegValueType))
EndIf


Func _Blue_RegType($Type)
    Switch Number($Type)
    Case 0
        Return "REG_NONE"
    Case 1
        Return "REG_SZ"
    Case 2
        Return "REG_EXPAND_SZ"
    Case 3
        Return "REG_BINARY"
    Case 4
        Return "REG_DWORD"
    Case 5
        Return "REG_DWORD_BIG_ENDIAN"
    Case 6
        Return "REG_LINK"
    Case 7
        Return "REG_MULTI_SZ"
    Case 8
        Return "REG_RESOURCE_LIST"
    Case 9
        Return "REG_FULL_RESOURCE_DESCRIPTOR"
    Case 10
        Return "REG_RESOURCE_REQUIREMENTS_LIST"
    Case 11
        Return "REG_QWORD"
    Case Else
        Return SetError(1,0,$Type)
    EndSwitch
EndFunc
Link to comment
Share on other sites

  • 3 hafta sonra ...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...