|
|
|
|
|
- Creating a key
- Handling the registry in Windows Vista (and later)
RegistryCreateKey (Function) In french: RegistreCréeClé Creates a key in the Windows registry.
ResCréeClé = RegistryCreateKey("HKEY_LOCAL_MACHINE\SOFTWARE\MonAppli")
Syntax
<Result> = RegistryCreateKey([<Access mode>, ] <Key path>)
<Result>: Boolean - True if the key was created,
- False otherwise.
If the key already exists, it is not modified: the function RegistryCreateKey returns False and variable ErrorOccurred is set to False.
<Access mode>: Integer constant Registry access mode:
| | registryMode32 | Forced mode to access the registry as a 32-bit program. | registryMode64 | Forced mode to access the registry as a 64-bit program. | registryModeAuto (Default value) | Automatic registry access mode: - a 32-bit application running on a 32-bit system manipulates the registry as a 32-bit program.
- a 32-bit application running on a 64-bit system manipulates the registry from the following branch:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node - a 64-bit application running on a 64-bit system manipulates the registry as a 64-bit program.
|
<Key path>: Character string Full path of key to create. Remarks - Key creation is recursive: if the directories specified in the <Chemin de la clé> parameter do not exist, they are automatically created in the registry.
- Only secondary keys can be created (no primary key can be created).
Handling the registry in Windows Vista (and later) Starting with Windows Vista, if the UAC mechanism is enabled, you must have administrator rights to write to the "HKEY_LOCAL_MACHINE\SOFTWARE" key. If the user does not have sufficient rights, the UAC mechanism automatically redirects to the "HKEY_CURRENT_USER\Software\Classes\VirtualStore\MACHINE\SOFTWARE" key. The purpose of this redirection is to ensure the compatibility of the applications. The keys written in this directory can be read by the application that has written them. Reminder When creating an executable, you can include a manifest to give the application administrator rights. Business / UI classification: Business Logic
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|