PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
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.
Versions 27 and later
WEBDEV - Server code This function is now available for WEBDEV sites in Windows.
New in version 27
WEBDEV - Server code This function is now available for WEBDEV sites in Windows.
WEBDEV - Server code This function is now available for WEBDEV sites in Windows.
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
Versions 27 and later
Registry access mode:
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.
registryMode32Forced mode to access the registry as a 32-bit program.
registryMode64Forced mode to access the registry as a 64-bit program.
New in version 27
Registry access mode:
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.
registryMode32Forced mode to access the registry as a 32-bit program.
registryMode64Forced mode to access the registry as a 64-bit program.
Registry access mode:
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.
registryMode32Forced mode to access the registry as a 32-bit program.
registryMode64Forced mode to access 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
Versions 27 and later
Registry access mode:
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.
registryMode32Forced mode to access the registry as a 32-bit program.
registryMode64Forced mode to access the registry as a 64-bit program.
New in version 27
Registry access mode:
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.
registryMode32Forced mode to access the registry as a 32-bit program.
registryMode64Forced mode to access the registry as a 64-bit program.
Registry access mode:
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.
registryMode32Forced mode to access the registry as a 32-bit program.
registryMode64Forced mode to access 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.
  • On versions of Windows prior to Windows Vista, renaming operations are not performed in transaction. If an operation fails (deletion of a key for example), the previous operations (copy of the key for example) are not canceled.
Business / UI classification: Business Logic
Component: wd270std.dll
Minimum version required
  • Version 16
This page is also available for…
Comments
Click [Add] to post a comment