|
|
|
|
|
- Creating a key
- Handling the registry in Windows Vista (and later)
RegistryCreateKey (Function) Creates a key in the Windows registry.
ResCreateKey = RegistryCreateKey("HKEY_LOCAL_MACHINE\SOFTWARE\MyApp")
Sintaxis
<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 Modo de acceso al registro:
| | registryMode32 | Modo forzado para acceder al registro como un programa de 32 bits. | registryMode64 | Modo forzado para acceder al registro como un programa de 64 bits. | registryModeAuto (Valor predeterminado) | Modo de acceso automático al registro: - una aplicación de 32 bits que se ejecuta en un sistema de 32 bits manipula el registro como un programa de 32 bits.
- una aplicación de 32 bits que se ejecuta en un sistema de 64 bits manipula el registro desde la siguiente rama:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node - una aplicación de 64 bits que se ejecuta en un sistema de 64 bits manipula el registro como un programa de 64 bits.
|
<Key path>: Character string Full path of key to create. Observaciones - 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. Clasificación Lógica de negocio / UI: Lógica de negocio
Esta página también está disponible para…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|