dos_regaddkey - dalefugier/DOSLib GitHub Wiki

Adds a new key to the Windows Registry. This function creates all the keys in the specified path, if necessary.

WARNING: Using Registry functions incorrectly can cause serious problems that may require you to reinstall your operating system. Use Registry functions carefully.

Syntax

(dos_regaddkey hive key)

Parameters

hive

The registry hive. Valid values include:

  • HKEY_CURRENT_USER
  • HKEY_LOCAL_MACHINE
  • HKEY_USERS
  • HKEY_CURRENT_CONFIG
  • HKEY_CLASSES_ROOT
  • HKEY_PERFORMANCE_DATA
  • HKEY_DYN_DATA

key

The registry key to add.

Returns

T if successful.

nil on error.

Examples

(dos_regaddkey "HKEY_CURRENT_USER" "Software\\MyCompany\\MyProduct")
T