Job Management Partner 1/Software Distribution Automatic Installation Tool Description and Reference

[Contents][Glossary][Index][Back][Next]

AIT_RegDeleteKey

Description

Deletes a sub-key for a specified registry.

Format

bool AIT_RegDeleteKey(
  integer nHKeyHandle,     // Key handle
  string strRegKeyName     // Name of a key to be deleted
);

Parameters

nHKeyHandle (input)

Specify a handle to an already opened registry key.

strRegKeyName (input)

Specify a sub-key name for a registry to be deleted.

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 may return.

Extended error number Error code
2 ERROR_FILE_NOT_FOUND
5 ERROR_ACCESS_DENIED
6 ERROR_INVALID_HANDLE
87 ERROR_INVALID_PARAMETER
1009 ERROR_BADDB
1010 ERROR_BADKEY
1015 ERROR_REGISTRY_CORRUPT
1016 ERROR_REGISTRY_IO_FAILED
1019 ERROR_NO_LOG_SPACE

Note

When the OS of the client is Windows NT, if the specified key has a sub-key, you cannot delete the specified key. Before deleting a key, delete all of its sub-keys. When the OS of the client is Windows Me or Windows 98, you can delete the specified key including its sub-keys.