Function Reference


_WinAPI_RegCopyTreeEx

Copies the specified registry key, along with its values and subkeys, to the specified destination key

#include <WinAPIReg.au3>
_WinAPI_RegCopyTreeEx ( $hSrcKey, $sSrcSubKey, $hDestKey )

Parameters

$hSrcKey Handle to an open registry key. The key must have been opened with the $KEY_READ access right.
This handle is returned by the _WinAPI_RegCreateKey() or _WinAPI_RegOpenKey() function,
or it can be one of the predefined registry keys ($HKEY_*).
$sSrcSubKey The name of the key. This key must be a subkey of the key identified by the $hSrcKey parameter.
$hDestKey Handle to the destination key. The calling process must have $KEY_CREATE_SUB_KEY access to the key.
This handle is returned by the _WinAPI_RegCreateKey() or _WinAPI_RegOpenKey() function,
or it can be one of the predefined registry keys ($HKEY_*).

Return Value

Success: 1.
Failure: 0 and sets the @error flag to non-zero, @extended flag may contain the system error code.

Remarks

This function also copies the security descriptor for the key.

This function requires Windows Vista or later.

See Also

Search RegCopyTree in MSDN Library.