Collection of functions related to Windows Registry. Use with caution: some registry information might require administrative rights.
Delete Registry Key |
Technical Name | Type | Minimal Agent Version |
---|---|---|
del | synchronous | WIN-2.0.0 (WIN for Windows) |
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
key | string | mandatory | Name of the registry key or key value to be deleted. | |
root | irpa_core.enums.registry.root | optional | Selects the registry root key if it is not mentioned in the key name. Default is 'Current User' |
Sample Code:
irpa_core.registry.del('HKCU\\Software\\ACME\\FortuneTeller\\MindReader');
Sample Code:
irpa_core.registry.del('HKCU\\Software\\ACME\\FortuneTeller\\');
Sample Code:
irpa_core.registry.del('Software\\ACME\\FortuneTeller\\MindReader', irpa_core.enums.registry.root.CurrentUser);
Sample Code:
irpa_core.registry.del('Software\\ACME\\FortuneTeller\\', irpa_core.enums.registry.root.CurrentUser);
Note:
Specify a key-name by ending 'key' with a final backslash.
Note:
Do not include a final backslash to specify a value name.
Get Registry Information |
Technical Name | Type | Minimal Agent Version |
---|---|---|
get | synchronous | WIN-2.0.0 (WIN for Windows) |
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
key | string | mandatory | Name of the key or key value for which the value is to be obtained. | |
root | irpa_core.enums.registry.root | optional | Selects the registry root key if it is not mentioned in the key name. Default is 'Current User' |
Name | Type | Description |
---|---|---|
returnedKey | any | Returns the key or key value from the registry. |
Sample Code:
data.IEVersion = irpa_core.registry.get('HKLM\\SOFTWARE\\Microsoft\\Internet Explorer\\Version'); data.IEVersion = irpa_core.registry.get('SOFTWARE\\Microsoft\\Internet Explorer\\Version', irpa_core.enums.registry.root.LocalMachine);
Note:
Specify a key-name by ending 'key' with a final backslash.
Note:
Do not include a final backslash to specify a value name.
Note:
When you specify a key-name (as opposed to a value-name), the method returns the default value.
Set Key/Key Value |
Technical Name | Type | Minimal Agent Version |
---|---|---|
set | synchronous | WIN-2.0.0 (WIN for Windows) |
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
key | string | mandatory | Registry key to be set. | |
value | any | mandatory | Value to be set. | |
root | irpa_core.enums.registry.root | optional | Selects the registry root key if it is not mentioned in the key name. Default is 'Current User' | |
type | irpa_core.enums.registry.type | optional | Selects the value type. Default is 'string'. |
Sample Code:
irpa_core.registry.set('HKCU\\Software\\MySoftware\\MyCompany\\Settings\\Color', 'blue', irpa_core.enums.registry.root.CurrentUser, irpa_core.enums.registry.type.String);
Note:
Specify a key-name by ending 'key' with a final backslash.
Note:
Do not include a final backslash to specify a value name.