#include <winuser.h>
#include <winreg.h>
#include <wincon.h>
+#include <shlwapi.h>
#include <wine/unicode.h>
#include "reg.h"
/* Delete subtree only if no /v* option is given */
if (!value_name && !value_empty && !value_all)
{
- if (RegDeleteTreeW(root,p)!=ERROR_SUCCESS)
+ if (SHDeleteKeyW(root, p) != ERROR_SUCCESS)
{
reg_message(STRING_CANNOT_FIND);
return 1;