ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / Windows functions / Registry functions
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
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.
Example
// 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:
registryMode32Forced mode to access the registry as a 32-bit program.
registryMode64Forced 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:
registryMode32Forced mode to access the registry as a 32-bit program.
registryMode64Forced 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
Component: wd290std.dll
Minimum version required
  • Version 16
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 11/21/2023

Send a report | Local help