msi: Do not open registry keys with no access rights.

Signed-off-by: Thomas Faber <thomas.faber@reactos.org>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Thomas Faber 2015-11-27 12:25:27 +01:00 committed by Alexandre Julliard
parent a573f237d0
commit 57fa1bee65

View file

@ -3003,7 +3003,7 @@ static void delete_key( const MSICOMPONENT *comp, HKEY root, const WCHAR *path )
{
*p = 0;
if (!p[1]) continue; /* trailing backslash */
hkey = open_key( comp, root, subkey, FALSE, access );
hkey = open_key( comp, root, subkey, FALSE, access | READ_CONTROL );
if (!hkey) break;
res = RegDeleteKeyExW( hkey, p + 1, access, 0 );
RegCloseKey( hkey );