Skip to content

Registry⚓︎

The JNIOR's Registry is a collection of key value pairs that can be thought of in a directory structure.

Registry Key Object⚓︎

Version 26.0.0 - May ##, 2026

A Registry Key object when created represents a Registry Key on the JNIOR, and contains a key name and key value. The key it represents is based on the Registry Key path you give it.

Registry List Object⚓︎

Version 26.0.0 - May ##, 2026

A Registry List object when created represents a registry folder on the JNIOR, and contains an array of Registry Keys. This is not recursive. The registry folder it represents is based on the registry folder path you give it.

Get Registry Key⚓︎

Since: Version 26.0.0 - May ##, 2026

Authentication Level: Any

You must get a Registry Key from the Library. The library is the authoritative source of all registry values. It will be alerted of updates to keys so it will always be up-to-date. The "registry get key" function allows you to create a registry key object in your code that represents the registry key on the JNIOR. Registry Key object will represent a registry key on the JNIOR according to the registry key name you give it.

1
2
3
// make calls to get the registry keys for $serialnumber and $version
ipg::REGISTRY_KEY *serial_number_key = ipg::registry_get_key(m_uuid, "$serialnumber");
ipg::REGISTRY_KEY *version_key = ipg::registry_get_key(m_uuid, "$version");
1
2
3
// Making a registryGetKey call defines a registry value for you to interact with
// You need to 'get' a key before you can read from it or write to it
var serialNumberRegistryKey = _jmpConnection.RegistryGetKey("$serialnumber");
1
2
3
// Making a registryGetKey call defines a registry value for you to interact with
// You need to 'get' a key before you can read from it or write to it
RegistryKey serialKey = jmpConnection.registryGetKey("$serialnumber");
1
2
3
# Making a registry_get_key call defines a registry value for you to interact with
# You need to 'get' a key before you can read from it or write to it
serial_number = jmp_connection.registry_get_key("$serialNumber")

List Registry Keys⚓︎

Since: Version 26.0.0 - May ##, 2026

Authentication Level: Any

You must get a Registry List from the Library. The library is the authoritative source of all registry values. It will be alerted of updates to keys so it will always be up-to-date. Similar to to the 'registry get key' function, the 'registry list keys' function allows you to create a registry list object in your code that represents the registry folder on the JNIOR. If the list contains another registry folder, that registry key in the list will have no value.

1
coming soon...
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
// Making a registryListKeys call defines a registry list object for 
// you to interact with
// A registry list object contains one value: an array of registy keys
// from the registry folder you defined
var registryList = _jmpConnection.RegistryListKeys("/");

// The Keys attribute returns the registry key array from 
// the registry list object
registryList.Keys()

// Doing the length() call will get you the amount of keys in the array
registryList.length()
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
// Making a registryListKeys call defines a registry list object for 
// you to interact with
// A registry list object contains one value: an array of registy keys
// from the registry folder you defined
RegistryList keyList = jmpConnection.registryListKeys("/");

// The getKeysArray helper function returns the registry key array from 
// the registry list object
keyList.getKeysArray()

// Doing the length() call will get you the amount of keys in the array
keyList.getKeysArray().length()

When creating a registry list object in Python, it passes it through a C++ function. This is passed by reference in the Python DLL, because doing it by value would create a COPY of the array to interact with, and changes made to that copy would not apply to the original registry list. Passing by reference though requires us to assign it to a local array of registry keys. In our example below, you'll see we use the jmplib_py.RegistryKeys() call to assign to the registry key array reference to a local array for when we want to read or write to it.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# Making a registryListKeys call defines a registry list object for 
# you to interact with
# A registry list object contains one value: an array of registy keys
# from the registry folder you defined
key_list = jmp_connection.registry_list("/")

# When reading a registry list in Python, you must assign the keys
# From the registry list to an array of Registry Keys
# The .keys value returns the registry key array from 
# the registry list object
registry_key_array = jmplib_py.RegistryKeys(key_list.keys)

# Doing the length() call will get you the amount of keys in the array
registry_key_array.length()

Read Registry Keys⚓︎

Since: Version 26.0.0 - May ##, 2026

Authentication Level: Any

Once you've created a registry key object, you then need to read it to get its value. You can read one or many keys at once. This function will block until the response is received.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
// make calls to get the registry keys for $serialnumber and $version
ipg::REGISTRY_KEY *serial_number_key = ipg::registry_get_key(m_uuid, "$serialnumber");
ipg::REGISTRY_KEY *version_key = ipg::registry_get_key(m_uuid, "$version");

// call the read_keys function.  this allows us to pass a dynamic number
// of keys.  we just need to pass a count ahead so that the number of
// dynamic keys to follow is known
ipg::registry_read_keys(m_uuid, 2, serial_number_key, version_key);

// print our keys so that we can see the values that were read
std::cout << serial_number_key->get_key_name() << "=" << serial_number_key->get_value() << std::endl;
std::cout << version_key->get_key_name() << "=" << version_key->get_value();
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
// Making a RegistryReadKeys call allows you to grab the Name and 
// Value of one or more registry keys

// Example reading a single registry key
var serialNumberRegistryKey = _jmpConnection.RegistryGetKey("$serialnumber");
_jmpConnection.RegistryReadKeys(SerialNumberRegistryKey);

// Example reading multiple registry keys at once
var serialNumberRegistryKey = _jmpConnection.RegistryGetKey("$serialnumber");
var versionKey = _jmpConnection.RegistryGetKey("$version");
var modelKey = _jmpConnection.RegistryGetKey("$model");
_jmpConnection.RegistryReadKeys(serialNumberRegistryKey, versionKey, modelKey);
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
// Making a RegistryReadKeys call allows you to grab the Name and 
// Value of one or more registry keys

// Example reading a single registry key
RegistryKey registryKeySerial = jmpConnection.registryGetKey("$serialnumber");
jmpConnection.registryReadKeys(registryKeySerial);

// Example reading multiple registry keys at once
RegistryKey registryKeySerial = jmpConnection.registryGetKey("$serialnumber");
RegistryKey registryKeyVersion = jmpConnection.registryGetKey("$version");
RegistryKey registryKeyModel = jmpConnection.registryGetKey("$model");
jmpConnection.registryReadKeys(registryKeySerial, registryKeyVersion, registryKeyModel);

// Example reading an array of registry keys returned from a registry 
// list
RegistryList keyList = jmpConnection.registryListKeys("IpConfig");
jmpConnection.registryReadKeys(keyList.listKeys());
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
# Making a registry_read_keys call allows you to grab the Name and 
# Value of one or more registry keys

# Example reading a single registry key
serial_number = jmp_connection.registry_get_key("$serialNumber")
jmp_connection.registry_read_keys(serial_number)

# Example reading multiple registry keys at once
serial_number = jmp_connection.registry_get_key("$serialNumber")
version = jmp_connection.registry_get_key("$version")
model = jmp_connection.registry_get_key("$model")
jmp_connection.registry_read_keys(serial_number, version, model)

# Example reading registry keys from a registry list
# Requires using the registry_read_keys_arry when reading from
# the returned registry key array from the jmplib_py.registry_keys() call
root_data = jmp_connection.registry_list("/")
registry_keys = jmplib_py.RegistryKeys(root_data.keys)
jmp_connection.registry_read_keys_array(registry_keys)

Write Registry Key⚓︎

Since: Version 26.0.0 - May ##, 2026

Authentication Level: Administrator

Once you've created a registry key object, you then need to write to it to change its value. You can write to one, or many keys.

1
2
3
4
// get a key that we will encrypt and set the value
ipg::REGISTRY_KEY *test_key = ipg::registry_get_key(m_uuid, "test/test");
test_key->set_value("some value");
ipg::registry_write_keys(m_uuid, 1, test_key);
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
// Making a RegistryWriteKeys call allows you to grab the Name and 
// Value of one or more registry keys

// Example writing a single registry key
RegistryKey RegistryKeyTest = _jmpConnection.RegistryGetKey("test");
RegistryKeyTest.SetKeyValue("writing to a registry key from Java.");
_jmpConnection.RegistryWriteKeys(RegistryKeyTest);

// Example writing multiple registry keys at once
RegistryKey registryKeyTest = _jmpConnection.RegistryGetKey("test");
registryKeyTest.SetKeyValue("writing to a registry key from Java.");
RegistryKey registryKeyTest2 = _jmpConnection.RegistryGetKey("test2");
registryKeyTest2.SetKeyValue("writing to second registry key from Java.");
RegistryKey registryKeyTest3 = _jmpConnection.RegistryGetKey("test3");
registryKeyTest3.SetKeyValue("writing to a third registry key from Java.");
_jmpConnection.RegistryWriteKeys(registryTest, registryTest2, registryTest3);
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
// Making a RegistryWriteKeys call allows you to grab the Name and 
// Value of one or more registry keys

// Example writing a single registry key
RegistryKey registryKeyTest = jmpConnection.registryGetKey("test");
registryKeyTest.setKeyValue("writing to a registry key from Java.");
jmpConnection.registryWriteKeys(registryKeyTest);

// Example writing multiple registry keys at once
RegistryKey registryKeyTest = jmpConnection.registryGetKey("test");
registryKeyTest.setKeyValue("writing to a registry key from Java.");
RegistryKey registryKeyTest2 = jmpConnection.registryGetKey("test2");
registryKeyTest2.setKeyValue("writing to second registry key from Java.");
RegistryKey registryKeyTest3 = jmpConnection.registryGetKey("test3");
registryKeyTest3.setKeyValue("writing to a third registry key from Java.");
jmpConnection.registryWriteKeys(registryTest, registryTest2, registryTest3);
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
# Making a RegistryWriteKeys call allows you to grab the Name and 
# Value of one or more registry keys

# Example writing a single registry key
registryKeyTest = jmp_connection.registry_get_key("test")
registryKeyTest.value = "writing to a registry key from Python."
jmp_connection.registry_write(registryChange)

# Example writing multiple registry keys at once
registryKeyTest1 = jmp_connection.registry_get_key("test")
registryKeyTest1.value = "writing to a registry key from Python."
registryKeyTest2 = jmp_connection.registry_get_key("test2")
registryKeyTest2.value = "writing to a second registry key from Python."
registryKeyTest3 = jmp_connection.registry_get_key("test3")
registryKeyTest3.value = "writing to a third registry key from Python."
jmp_connection.registry_write_keys(registryKeyTest1, registryKeyTest2, registryKeyTest3)

# Example writing registry keys from a registry array
# Requires using the registry_write_keys_array when writing
registry_keys = [registryKeyTest1, registryKeyTest2, registryKeyTest3]
jmp_connection.registry_write_keys_array(registry_keys)

Registry Callback⚓︎

Since: Version 26.0.0 - May ##, 2026

Authentication Level: Any

Registry Keys can change for many reasons. Maybe someone else changed a value, maybe the registry is being written to with real-time information. You might want to be alerted about those changes. Reading all of the keys you want to know about over and over quickly can present unwanted overhead. The best way to handle this is to be alerted of the changes when they happen. To do this you will implement a function that will be called when a Registry Key changes.

Here are some examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
...

// the callback method that will be alerted when there is a registry key update
static void registry_update_callback(const char *uuid, const char *key_name, const char *value) {
    std::cout << std::format("  [{}]  {}={}\n", uuid, key_name, value);
}

...

// attach a callback to get the registry updates
ipg::add_registry_update_callback(
    reinterpret_cast<ipg::RegistryUpdateCallbackFunction>(registry_update_callback));

...
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
// Defines the callback method that runs when a registry key is updated
private static void OnRegistryCallback(string uuid, string key, string value)
{
    Console.WriteLine($"{uuid}: Registry Key update: {key}={value}");
}

// Once the onRegistrykeyUpdate function is defined, you can
// now add the registry listener to enable the callback.
// This will check for changes to any registry keys, and run 
// the onRegistryKeyUpdate function when they occur.
_JmpLib.add_registry_update_callback(callback);
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
// Defines the callback method that runs when a registry key is updated
@Override
public void onRegistryKeyUpdate(JmpConnection jmpConnection, String keyname, String keyvalue) {
    System.out.println("Key Name = " + keyname);
    System.out.println("Key Value = " + keyvalue);
}

// Once the onRegistrykeyUpdate function is defined, you can
// now add the registry listener to enable the callback.
// This will check for changes to any registry keys, and run 
// the onRegistryKeyUpdate function when they occur.
JmpLib.addRegistryListener(this);
1
2
3
4
5
6
7
8
9
# Defines the callback method that runs when a registry key is updated
def on_registry_update(jmp_connection, key_name: str, value: str):
    print(f"Registry Update: {key_name}. Value: {value}")

# Once the on_registry_update function is defined, you can
# now add the registry listener to enable the callback.
# This will check for changes to any registry keys, and run 
# the on_registry_update function when they occur.
jmplib_py.add_registry_update_callback(on_registry_update)
dsgf