Reg_CreateValue Function

Action

Creates a value in a key with the specified data.

Syntax

Reg_CreateValue (hRootKey, sPath, sValueName, sValueData)
Variable Description
hRootKey The constant from mswconst.inc for the root key. For example HKEY_CURRENT_USER or HKEY_LOCAL_MACHINE. LONG.
sPath The full path of the key that will contain the new value. STRING.
sValueName The name of the new value. STRING.
sValueData The data for the value. Supports string, binary, and DWORD values, using the format used by SYS_SetRegistryValue(). STRING.

Notes

Registry functions work remotely (as well as locally).

Registry functions are shipped in the separate file Registry.inc that is not automatically included in the Use Files, as the appropriate extension .inc files are. The Registry.txt file contains the library browser content for the registry files. In order to use the Registry functions:

  • Explicitly add the .inc file (as for the mswxxx.inc files) to the Use Files field in the Runtime Options dialog.
  • Add the Registry.txt file to the Help files for library browser field in the General Options dialog.

Example

Reg_CreateValue (HKEY_LOCAL_MACHINE, "Software\Company\Product", "Directory", "C:\TEMP")