From fdc0d0f95f8a86b73094db15aaca2f861aab50f8 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Fri, 26 Aug 2011 14:28:11 +0200 Subject: [PATCH] winecfg: Fix deletion of registry keys for Wow64 mode. --- programs/winecfg/winecfg.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/programs/winecfg/winecfg.c b/programs/winecfg/winecfg.c index 1d2ec502b68..8a2f534211a 100644 --- a/programs/winecfg/winecfg.c +++ b/programs/winecfg/winecfg.c @@ -645,7 +645,11 @@ static void process_setting(struct setting *s) { /* NULL name means remove that path/section entirely */ if (s->name) RegDeleteValueW( key, s->name ); - else RegDeleteTreeW( key, NULL ); + else + { + RegDeleteTreeW( key, NULL ); + RegDeleteKeyW( s->root, s->path ); + } RegCloseKey( key ); } if (needs_wow64) @@ -654,7 +658,11 @@ static void process_setting(struct setting *s) if (!RegOpenKeyExW( s->root, s->path, 0, MAXIMUM_ALLOWED | KEY_WOW64_32KEY, &key )) { if (s->name) RegDeleteValueW( key, s->name ); - else RegDeleteTreeW( key, NULL ); + else + { + RegDeleteTreeW( key, NULL ); + RegDeleteKeyExW( s->root, s->path, KEY_WOW64_32KEY, 0 ); + } RegCloseKey( key ); } }