PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
RegistryRename (Function)
In French: RegistreRenomme
Renames a key and/or a value in the registry.
Note: 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(<Name of Key to Rename> , <New Key Name>)
<Result>: Boolean
  • True if the rename operation was performed,
  • False otherwise.
<Name of Key to Rename>: Character string (with quotes)
Full path of the key to rename. <Result> will return False if this key does not exist.
<New Key Name>: Character string (with quotes)
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(<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.
<Name of Key to Rename>: Character string (with quotes)
Full path of the key to rename. <Result> will return False if this key does not exist.
<Name of Value to Rename>: Character string (with quotes)
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>: Character string (with quotes)
New path and name of the key. If this parameter corresponds to an empty string (""), the name of the key is not modified. <Result> will return False if this key already exists.
<New Value Name>: Character string (with quotes)
New name of the value in the registry for the specified key.
Remarks
  • RegistryRename performs a recursive copy then a recursive deletion.
  • From Windows Vista and later, the operations linked to the renaming are performed in a transaction. If an operation fails, all the previous operations are canceled.
  • In the earlier versions of Windows, the operations linked to the renaming 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.
Components
WINDEVReports and Queries wd230std.dll
Minimum required version
  • Version 16
This page is also available for…
Comments
Click [Add] to post a comment