From 6a7363b69432ceed1ddb8e6172272773fdd64d63 Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Thu, 19 Nov 2015 12:53:33 +0100 Subject: [PATCH] kernel32: Call registry functions with full key path. Signed-off-by: Jacek Caban Signed-off-by: Alexandre Julliard --- dlls/kernel32/computername.c | 3 ++- dlls/kernel32/except.c | 3 ++- dlls/kernel32/locale.c | 6 +++--- dlls/kernel32/oldconfig.c | 6 +++--- dlls/kernel32/path.c | 3 ++- dlls/kernel32/process.c | 9 ++++++--- 6 files changed, 18 insertions(+), 12 deletions(-) diff --git a/dlls/kernel32/computername.c b/dlls/kernel32/computername.c index 0c81ac033ce..1b5f4aa4e5b 100644 --- a/dlls/kernel32/computername.c +++ b/dlls/kernel32/computername.c @@ -50,7 +50,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(computername); /* Registry key and value names */ -static const WCHAR ComputerW[] = {'M','a','c','h','i','n','e','\\', +static const WCHAR ComputerW[] = {'\\','R','e','g','i','s','t','r','y','\\', + 'M','a','c','h','i','n','e','\\', 'S','y','s','t','e','m','\\', 'C','u','r','r','e','n','t','C','o','n','t','r','o','l','S','e','t','\\', 'C','o','n','t','r','o','l','\\', diff --git a/dlls/kernel32/except.c b/dlls/kernel32/except.c index 2a7dbaa71de..1a1521a8038 100644 --- a/dlls/kernel32/except.c +++ b/dlls/kernel32/except.c @@ -192,7 +192,8 @@ static BOOL start_debugger(PEXCEPTION_POINTERS epointers, HANDLE hEvent) BOOL ret = FALSE; char buffer[256]; - static const WCHAR AeDebugW[] = {'M','a','c','h','i','n','e','\\', + static const WCHAR AeDebugW[] = {'\\','R','e','g','i','s','t','r','y','\\', + 'M','a','c','h','i','n','e','\\', 'S','o','f','t','w','a','r','e','\\', 'M','i','c','r','o','s','o','f','t','\\', 'W','i','n','d','o','w','s',' ','N','T','\\', diff --git a/dlls/kernel32/locale.c b/dlls/kernel32/locale.c index 6dc0d05b861..3b632b4a844 100644 --- a/dlls/kernel32/locale.c +++ b/dlls/kernel32/locale.c @@ -62,13 +62,13 @@ static const union cptable *mac_cptable; static const union cptable *unix_cptable; /* NULL if UTF8 */ static const WCHAR szLocaleKeyName[] = { - 'M','a','c','h','i','n','e','\\','S','y','s','t','e','m','\\', + '\\','R','e','g','i','s','t','r','y','\\','M','a','c','h','i','n','e','\\','S','y','s','t','e','m','\\', 'C','u','r','r','e','n','t','C','o','n','t','r','o','l','S','e','t','\\', 'C','o','n','t','r','o','l','\\','N','l','s','\\','L','o','c','a','l','e',0 }; static const WCHAR szLangGroupsKeyName[] = { - 'M','a','c','h','i','n','e','\\','S','y','s','t','e','m','\\', + '\\','R','e','g','i','s','t','r','y','\\','M','a','c','h','i','n','e','\\','S','y','s','t','e','m','\\', 'C','u','r','r','e','n','t','C','o','n','t','r','o','l','S','e','t','\\', 'C','o','n','t','r','o','l','\\','N','l','s','\\', 'L','a','n','g','u','a','g','e',' ','G','r','o','u','p','s',0 @@ -875,7 +875,7 @@ void LOCALE_InitRegistry(void) if (locale_update_registry( hkey, lc_ctypeW, lcid_LC_CTYPE, NULL, 0 )) { static const WCHAR codepageW[] = - {'M','a','c','h','i','n','e','\\','S','y','s','t','e','m','\\', + {'\\','R','e','g','i','s','t','r','y','\\','M','a','c','h','i','n','e','\\','S','y','s','t','e','m','\\', 'C','u','r','r','e','n','t','C','o','n','t','r','o','l','S','e','t','\\', 'C','o','n','t','r','o','l','\\','N','l','s','\\','C','o','d','e','p','a','g','e',0}; diff --git a/dlls/kernel32/oldconfig.c b/dlls/kernel32/oldconfig.c index 2c8bc18b0bc..6c80dc614f0 100644 --- a/dlls/kernel32/oldconfig.c +++ b/dlls/kernel32/oldconfig.c @@ -100,11 +100,11 @@ static void create_scsi_entry( PSCSI_ADDRESS scsi_addr, LPCSTR lpDriver, UINT uD HANDLE lunKey; DWORD disp; - if (create_key( 0, "Machine\\HARDWARE\\DEVICEMAP", &scsiKey, &disp )) return; + if (create_key( 0, "\\Registry\\Machine\\HARDWARE\\DEVICEMAP", &scsiKey, &disp )) return; NtClose( scsiKey ); /* Ensure there is Scsi key */ - if (create_key( 0, "Machine\\HARDWARE\\DEVICEMAP\\Scsi", &scsiKey, &disp )) return; + if (create_key( 0, "\\Registry\\Machine\\HARDWARE\\DEVICEMAP\\Scsi", &scsiKey, &disp )) return; snprintf(buffer,sizeof(buffer),"Scsi Port %d",scsi_addr->PortNumber); if (create_key( scsiKey, buffer, &portKey, &disp )) return; @@ -398,7 +398,7 @@ void convert_old_config(void) DWORD disp; /* create some hardware keys (FIXME: should not be done here) */ - if (create_key( 0, "Machine\\HARDWARE", &key, &disp )) return; + if (create_key( 0, "\\Registry\\Machine\\HARDWARE", &key, &disp )) return; NtClose( key ); if (disp != REG_OPENED_EXISTING_KEY) create_hardware_branch(); } diff --git a/dlls/kernel32/path.c b/dlls/kernel32/path.c index d8977f9d940..ff9422744ae 100644 --- a/dlls/kernel32/path.c +++ b/dlls/kernel32/path.c @@ -120,7 +120,8 @@ static BOOL add_boot_rename_entry( LPCWSTR source, LPCWSTR dest, DWORD flags ) static const WCHAR ValueName[] = {'P','e','n','d','i','n','g', 'F','i','l','e','R','e','n','a','m','e', 'O','p','e','r','a','t','i','o','n','s',0}; - static const WCHAR SessionW[] = {'M','a','c','h','i','n','e','\\', + static const WCHAR SessionW[] = {'\\','R','e','g','i','s','t','r','y','\\', + 'M','a','c','h','i','n','e','\\', 'S','y','s','t','e','m','\\', 'C','u','r','r','e','n','t','C','o','n','t','r','o','l','S','e','t','\\', 'C','o','n','t','r','o','l','\\', diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c index 17ae16dc2e0..89ae5c489d6 100644 --- a/dlls/kernel32/process.c +++ b/dlls/kernel32/process.c @@ -400,7 +400,8 @@ static void set_registry_variables( HANDLE hkey, ULONG type ) */ static BOOL set_registry_environment( BOOL volatile_only ) { - static const WCHAR env_keyW[] = {'M','a','c','h','i','n','e','\\', + static const WCHAR env_keyW[] = {'\\','R','e','g','i','s','t','r','y','\\', + 'M','a','c','h','i','n','e','\\', 'S','y','s','t','e','m','\\', 'C','u','r','r','e','n','t','C','o','n','t','r','o','l','S','e','t','\\', 'C','o','n','t','r','o','l','\\', @@ -504,7 +505,8 @@ static WCHAR *get_reg_value( HKEY hkey, const WCHAR *name ) */ static void set_additional_environment(void) { - static const WCHAR profile_keyW[] = {'M','a','c','h','i','n','e','\\', + static const WCHAR profile_keyW[] = {'\\','R','e','g','i','s','t','r','y','\\', + 'M','a','c','h','i','n','e','\\', 'S','o','f','t','w','a','r','e','\\', 'M','i','c','r','o','s','o','f','t','\\', 'W','i','n','d','o','w','s',' ','N','T','\\', @@ -570,7 +572,8 @@ static void set_wow64_environment(void) static const WCHAR archW[] = {'P','R','O','C','E','S','S','O','R','_','A','R','C','H','I','T','E','C','T','U','R','E',0}; static const WCHAR arch6432W[] = {'P','R','O','C','E','S','S','O','R','_','A','R','C','H','I','T','E','W','6','4','3','2',0}; static const WCHAR x86W[] = {'x','8','6',0}; - static const WCHAR versionW[] = {'M','a','c','h','i','n','e','\\', + static const WCHAR versionW[] = {'\\','R','e','g','i','s','t','r','y','\\', + 'M','a','c','h','i','n','e','\\', 'S','o','f','t','w','a','r','e','\\', 'M','i','c','r','o','s','o','f','t','\\', 'W','i','n','d','o','w','s','\\', -- 2.11.4.GIT