$sRegHive = "HKEY_LOCAL_MACHINE" $sRegKey = "SOFTWARE\AutoIt v3\AutoIt" $sRegKeyNew = "SOFTWARE\AutoIt v3\AutoIt New" _RegCopyKey($sRegHive, $sRegKey, $sRegKeyNew, False) If @error Then MsgBox(48, "Error", "There was an error while copying the key.") Else MsgBox(64, "Success", "The key was copied successfully.") EndIf ;=============================================================================== ; ; Function Name: _RegCopyKey ; Description:: Copies a registry key. ; Parameter(s):