IDAPython 8.4
Loading...
Searching...
No Matches
ida_registry Namespace Reference

Detailed Description

Registry related functions.

IDA uses the registry to store global configuration options that must persist
after IDA has been closed.

On Windows, IDA uses the Windows registry directly. On Unix systems, the
registry is stored in a file (typically ~/.idapro/ida.reg).

The root key for accessing IDA settings in the registry is defined by
ROOT_KEY_NAME.

Functions

"PyObject *" reg_read_string (*args)
 reg_read_string(name, subkey=None, _def=None) -> str Read a string from the registry.
 
"regval_type_t" reg_data_type (*args)
 reg_data_type(name, subkey=None) -> regval_type_t Get data type of a given value.
 
"PyObject *" reg_read_binary (*args)
 reg_read_binary(name, subkey=None) -> bytes or None Read binary data from the registry.
 
"PyObject *" reg_write_binary (*args)
 reg_write_binary(name, py_bytes, subkey=None) -> PyObject * Write binary data to the registry.
 
"PyObject *" reg_subkey_subkeys (*args)
 reg_subkey_subkeys(name) -> [str, ...] Get all subkey names of given key.
 
"PyObject *" reg_subkey_values (*args)
 reg_subkey_values(name) -> [str, ...] Get all value names under given key.
 
"bool" reg_delete_subkey (*args)
 reg_delete_subkey(name) -> bool Delete a key from the registry.
 
"bool" reg_delete_tree (*args)
 reg_delete_tree(name) -> bool Delete a subtree from the registry.
 
"bool" reg_delete (*args)
 reg_delete(name, subkey=None) -> bool Delete a value from the registry.
 
"bool" reg_subkey_exists (*args)
 reg_subkey_exists(name) -> bool Is there already a key with the given name?
 
"bool" reg_exists (*args)
 reg_exists(name, subkey=None) -> bool Is there already a value with the given name?
 
"qstrvec_t *" reg_read_strlist (*args)
 reg_read_strlist(subkey) Retrieve all string values associated with the given key.
 
"void" reg_update_strlist (*args)
 reg_update_strlist(subkey, add, maxrecs, rem=None, ignorecase=False) Update list of strings associated with given key.
 
"void" reg_write_string (*args)
 reg_write_string(name, utf8, subkey=None) Write a string to the registry.
 
"int" reg_read_int (*args)
 reg_read_int(name, defval, subkey=None) -> int Read integer value from the registry.
 
"void" reg_write_int (*args)
 reg_write_int(name, value, subkey=None) Write integer value to the registry.
 
"bool" reg_read_bool (*args)
 reg_read_bool(name, defval, subkey=None) -> bool Read boolean value from the registry.
 
"void" reg_write_bool (*args)
 reg_write_bool(name, value, subkey=None) Write boolean value to the registry.
 
"void" reg_update_filestrlist (*args)
 reg_update_filestrlist(subkey, add, maxrecs, rem=None) Update registry with a file list.
 
"bool" set_registry_root (*args)
 set_registry_root(name) -> bool
 
"void" reg_load (*args)
 reg_load()
 
"void" reg_flush (*args)
 reg_flush()
 

Variables

 ROOT_KEY_NAME = _ida_registry.ROOT_KEY_NAME
 
 reg_unknown = _ida_registry.reg_unknown
 
 reg_sz = _ida_registry.reg_sz
 
 reg_binary = _ida_registry.reg_binary
 
 reg_dword = _ida_registry.reg_dword
 

Function Documentation

◆ reg_data_type()

"regval_type_t" reg_data_type ( * args)
Parameters
name(C++: const char *) value name
subkey(C++: const char *) key name
Returns
: false if the [key+]value doesn't exist

◆ reg_delete()

"bool" reg_delete ( * args)
Parameters
name(C++: const char *) value name
subkey(C++: const char *) parent key
Returns
: success

◆ reg_delete_subkey()

"bool" reg_delete_subkey ( * args)
Parameters
name(C++: const char *) char const *

◆ reg_delete_tree()

"bool" reg_delete_tree ( * args)
Parameters
name(C++: const char *) char const *

◆ reg_exists()

"bool" reg_exists ( * args)
Parameters
name(C++: const char *) value name
subkey(C++: const char *) parent key

◆ reg_flush()

"void" reg_flush ( * args)

◆ reg_load()

"void" reg_load ( * args)

◆ reg_read_binary()

"PyObject *" reg_read_binary ( * args)
Parameters
name(C++: const char *) value name
subkey(C++: const char *) key name
Returns
: success

◆ reg_read_bool()

"bool" reg_read_bool ( * args)
Parameters
name(C++: const char *) value name
defval(C++: bool) default value
subkey(C++: const char *) key name
Returns
: boolean read from registry, or 'defval' if the read failed

◆ reg_read_int()

"int" reg_read_int ( * args)
Parameters
name(C++: const char *) value name
defval(C++: int) default value
subkey(C++: const char *) key name
Returns
: the value read from the registry, or 'defval' if the read failed

◆ reg_read_string()

"PyObject *" reg_read_string ( * args)
Parameters
name(C++: const char *) value name
subkey(C++: const char *) key name
defchar const *
Returns
: success

◆ reg_read_strlist()

"qstrvec_t *" reg_read_strlist ( * args)

Also see reg_update_strlist().

Parameters
subkey(C++: const char *) char const *

◆ reg_subkey_exists()

"bool" reg_subkey_exists ( * args)
Parameters
name(C++: const char *) char const *

◆ reg_subkey_subkeys()

"PyObject *" reg_subkey_subkeys ( * args)
Parameters
name(C++: const char *) char const *

◆ reg_subkey_values()

"PyObject *" reg_subkey_values ( * args)
Parameters
name(C++: const char *) char const *

◆ reg_update_filestrlist()

"void" reg_update_filestrlist ( * args)

Case sensitivity will vary depending on the target OS.

Note
: 'add' and 'rem' must be UTF-8, just like for regular string operations.
Parameters
subkey(C++: const char *) char const *
add(C++: const char *) char const *
maxrecs(C++: size_t)
rem(C++: const char *) char const *

◆ reg_update_strlist()

"void" reg_update_strlist ( * args)
Parameters
subkey(C++: const char *) key name
add(C++: const char *) string to be added to list, can be nullptr
maxrecs(C++: size_t) limit list to this size
rem(C++: const char *) string to be removed from list, can be nullptr
ignorecase(C++: bool) ignore case for 'add' and 'rem'

◆ reg_write_binary()

"PyObject *" reg_write_binary ( * args)
Parameters
name(C++: const char *) value name
py_bytesPyObject *
subkey(C++: const char *) key name

◆ reg_write_bool()

"void" reg_write_bool ( * args)
Parameters
name(C++: const char *) value name
value(C++: int) boolean to write (nonzero = true)
subkey(C++: const char *) key name

◆ reg_write_int()

"void" reg_write_int ( * args)
Parameters
name(C++: const char *) value name
value(C++: int) value to write
subkey(C++: const char *) key name

◆ reg_write_string()

"void" reg_write_string ( * args)
Parameters
name(C++: const char *) value name
utf8(C++: const char *) utf8-encoded string
subkey(C++: const char *) key name

◆ set_registry_root()

"bool" set_registry_root ( * args)
Parameters
namechar const *

Variable Documentation

◆ reg_binary

reg_binary = _ida_registry.reg_binary

◆ reg_dword

reg_dword = _ida_registry.reg_dword

◆ reg_sz

reg_sz = _ida_registry.reg_sz

◆ reg_unknown

reg_unknown = _ida_registry.reg_unknown

◆ ROOT_KEY_NAME

ROOT_KEY_NAME = _ida_registry.ROOT_KEY_NAME