|
|
|
|
RegistryRename (Function) In french: RegistreRenomme Renames a key and/or a value in the registry. Remark: Renaming a key consists in: - Copying the key.
- Renaming the copied key.
- Deleting the former key.
// Renames the "MyApp" key to "MyApplication" RegistryRename("HKEY_LOCAL_MACHINE\SOFTWARE\MyApp", "HKEY_LOCAL_MACHINE\SOFTWARE\MyApplication") Â // Renames the "Auto" value to "Automatic" RegistryRename("HKEY_LOCAL_MACHINE\SOFTWARE\MyApp", "Auto", "Automatic") Syntax
Renaming a key in the registry Hide the details
<Result> = RegistryRename([<Access mode>, ] <Name of key to rename> , <New key name>)
<Result>: Boolean - True if the rename operation was performed,
- False otherwise.
<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.
|
<Name of key to rename>: Character string Full path of the key to rename. <Result> will return False if this key does not exist. <New key name>: Character string New path and name of the key. <Result> will return False if this key already exists.
Renaming a registry key as well as its value Hide the details
<Result> = RegistryRename([<Access mode>, ] <Name of key to rename> , <Name of value to rename> [, <New key name>] , <New value name>)
<Result>: Boolean - True if the rename operation was performed,
- False otherwise.
<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.
|
<Name of key to rename>: Character string Full path of the key to rename. <Result> will return False if this key does not exist. <Name of value to rename>: Character string Name of the value to rename in the registry for the specified key. <Result> will return False if this value does not exist. <New key name>: Optional character string New path and name of the key. If this parameter corresponds to an empty string ("") or is not specified, the name of the key is not modified. <Result> will return False if this key already exists. <New value name>: Character string New name of the value in the registry for the specified key. Remarks - RegistryRename performs a recursive copy and then a recursive delete.
- Starting with Windows Vista, renaming-related operations are performed in a transaction. If an operation fails, all the previous operations are canceled.
- The owner of the key is lost when the key is renamed.
Business / UI classification: Business Logic
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|