mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 18:06:04 +00:00
[WINESYNC] reg: Support use of registry views when deleting registry keys.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org> wine commit id 31f070f7d3e312942d72e774a4a7dbd21b655a31 by Hugh McMaster <hugh.mcmaster@outlook.com>
This commit is contained in:
parent
fde082ff99
commit
129ed8f5fb
3 changed files with 27 additions and 23 deletions
|
@ -59,25 +59,29 @@ static int run_delete(HKEY root, WCHAR *path, REGSAM sam, WCHAR *key_name, WCHAR
|
|||
}
|
||||
}
|
||||
|
||||
/* Delete registry key if no /v* option is given */
|
||||
if (!value_name && !value_empty && !value_all)
|
||||
{
|
||||
if ((rc = RegDeleteTreeW(root, path)))
|
||||
{
|
||||
output_error(rc);
|
||||
return 1;
|
||||
}
|
||||
|
||||
output_message(STRING_SUCCESS);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if ((rc = RegOpenKeyExW(root, path, 0, KEY_READ|KEY_SET_VALUE|sam, &hkey)))
|
||||
{
|
||||
output_error(rc);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Delete registry key if no /v* option is given */
|
||||
if (!value_name && !value_empty && !value_all)
|
||||
{
|
||||
if ((rc = RegDeleteTreeW(hkey, NULL)))
|
||||
{
|
||||
RegCloseKey(hkey);
|
||||
output_error(rc);
|
||||
return 1;
|
||||
}
|
||||
|
||||
RegDeleteKeyW(hkey, L"");
|
||||
RegCloseKey(hkey);
|
||||
|
||||
output_message(STRING_SUCCESS);
|
||||
return 0;
|
||||
}
|
||||
|
||||
op_delete_key = FALSE;
|
||||
|
||||
if (value_all)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue