Hitachi

JP1 Version 12 JP1/IT Desktop Management 2 Distribution Function Administration Guide


AIT_RegSetStringValue

Organization of this page

Description

Sets data to a registry value of the character string data type (REG_SZ, REG_EXPAND_SZ, or REG_MULTI_SZ).

Format

bool AIT_RegSetStringValue(
  integer nHKeyHandle,      // Key handle
  string strRegKeyName,     // Registry sub-key name
  string strRegValueName,   // Registry value name
  string strRegValueData    // Registry value data
);

Parameters

nHKeyHandle (input)

Specify a handle to an already opened registry key, or one of the following values.

  • HKEY_CLASSES_ROOT

  • HKEY_CURRENT_CONFIG

  • HKEY_CURRENT_USER

  • HKEY_LOCAL_MACHINE

  • HKEY_USERS

strRegKeyName (input)

Specify a registry sub-key name.

strRegValueName (input)

Specify a registry value name you want to set.

strRegValueData (input)

Specify data you want to set to a registry value of the character string data type.

Return values

The return value is true if the function was executed normally, and false if not. If the function has returned false, you can use AIT_GetLastError to acquire an extended error code. The following gives the error codes that AIT_GetLastError might return:

Extended error number

Error code

6

ERROR_INVALID_HANDLE

87

ERROR_INVALID_PARAMETER

234

ERROR_MORE_DATA

1009

ERROR_BADDB

1010

ERROR_BADKEY

1011

ERROR_CANTOPEN

1013

ERROR_CANTWRITE

1015

ERROR_REGISTRY_CORRUPT

1016

ERROR_REGISTRY_IO_FAILED

1018

ERROR_KEY_DELETED

1019

ERROR_NO_LOG_SPACE

1169

ERROR_NO_MATCH

Notes