Announcement

Collapse
No announcement yet.

Get particular registry key value ( example get architecture bit )

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Get particular registry key value ( example get architecture bit )

    You can use below script to get any registry key value,

    Note: This script will provide you architecture value of system



    Code:
    import _winreg;
    key = getattr(_winreg,"HKEY_LOCAL_MACHINE")
    handle = _winreg.OpenKey(key, "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" )
    (value, type) = _winreg.QueryValueEx(handle,"PROCESSOR_ARCHITECTURE")
    print (value)

    sample output would be,


    Click image for larger version

Name:	get_registry_key_value.jpg
Views:	1
Size:	2.7 KB
ID:	4794
Working...
X