[PATCH 0/2] MR3563: server: Symlink CurrentControlSet to ControlSet001
Signed-off-by: Torge Matthies <openglfreak(a)googlemail.com> -- https://gitlab.winehq.org/wine/wine/-/merge_requests/3563
From: Torge Matthies <openglfreak(a)googlemail.com> Signed-off-by: Torge Matthies <openglfreak(a)googlemail.com> --- server/registry.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/server/registry.c b/server/registry.c index 3fea7dd79a4..794bdd12838 100644 --- a/server/registry.c +++ b/server/registry.c @@ -1892,10 +1892,18 @@ void init_registry(void) 'C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\', 'P','e','r','f','l','i','b','\\', '0','0','9'}; + static const WCHAR system[] = {'S','y','s','t','e','m'}; + static const WCHAR ccs[] = {'C','u','r','r','e','n','t','C','o','n','t','r','o','l','S','e','t'}; + static const WCHAR cs001[] = {'\\','R','E','G','I','S','T','R','Y','\\', + 'M','a','c','h','i','n','e','\\', + 'S','y','s','t','e','m','\\', + 'C','o','n','t','r','o','l','S','e','t','0','0','1'}; static const struct unicode_str root_name = { REGISTRY, sizeof(REGISTRY) }; static const struct unicode_str HKLM_name = { HKLM, sizeof(HKLM) }; static const struct unicode_str HKU_name = { HKU_default, sizeof(HKU_default) }; static const struct unicode_str perflib_name = { perflib, sizeof(perflib) }; + static const struct unicode_str system_name = { system, sizeof(system) }; + static const struct unicode_str ccs_name = { ccs, sizeof(ccs) }; WCHAR *current_user_path; struct unicode_str current_user_str; @@ -1973,6 +1981,19 @@ void init_registry(void) release_object( key ); } + if ((key = create_key_recursive( hklm, &system_name, current_time ))) + { + struct key *subkey; + subkey = create_key_object( &key->obj, &ccs_name, OBJ_OPENIF | OBJ_OPENLINK, 0, current_time, NULL ); + release_object( key ); + if (subkey) + { + subkey->flags |= KEY_SYMLINK; + set_value( subkey, &symlink_str, REG_LINK, cs001, sizeof(cs001) ); + release_object( subkey ); + } + } + release_object( hklm ); release_object( hkcu ); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/3563
From: Torge Matthies <openglfreak(a)googlemail.com> Signed-off-by: Torge Matthies <openglfreak(a)googlemail.com> --- loader/wine.inf.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/loader/wine.inf.in b/loader/wine.inf.in index 347af35af6d..9145a5b176d 100644 --- a/loader/wine.inf.in +++ b/loader/wine.inf.in @@ -602,6 +602,9 @@ HKLM,System\CurrentControlSet\Control\TimeZoneInformation,"TimeZoneKeyName",2,"" HKLM,System\CurrentControlSet\Control\VirtualDeviceDrivers,,16 HKLM,System\CurrentControlSet\Control\VMM32Files,,16 HKLM,System\Select,"Current",0x10003,1 +HKLM,System\Select,"Default",0x10003,1 +HKLM,System\Select,"Failed",0x10003,0 +HKLM,System\Select,"LastKnownGood",0x10003,1 HKCU,AppEvents\Schemes\Apps\Explorer\Navigating\.Current,,,"" HKCU,Software\Microsoft\Protected Storage System Provider,,16 ; Some apps requires at least four subkeys of Active Setup\Installed Components -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/3563
See https://web.archive.org/web/20150217152952/http://support.microsoft.com/kb/1... The ControlSet002 and Clone keys are not implemented, as well as switching between control sets (System\Select values are ignored). -- https://gitlab.winehq.org/wine/wine/-/merge_requests/3563#note_42125
Making it a symlink doesn't seem right. Is there an app that depends on this? -- https://gitlab.winehq.org/wine/wine/-/merge_requests/3563#note_42155
On Mon Aug 14 12:22:16 2023 +0000, Alexandre Julliard wrote:
Making it a symlink doesn't seem right. Is there an app that depends on this? The KB article says it's a "pointer" to ControlSet00X (X determined by System\Select\Default if boot is successful), which I assume means it's a symlink. There is an application that depends on ControlSet001 existing, because it reads some system info from there. That's technically not correct of it to do, because ControlSet001 may not be the active control set, but what can we do.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/3563#note_42160
The KB article says it's a "pointer" to ControlSet00X (X determined by System\\Select\\Default if boot is successful), which I assume means it's a symlink.
Would you mind adding a test for this? See `REG_LINK` tests in advapi32:registry for an example. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/3563#note_42310
participants (4)
-
Alexandre Julliard (@julliard) -
Jinoh Kang (@iamahuman) -
Torge Matthies -
Torge Matthies (@tmatthies)