mirror of
https://github.com/reactos/reactos.git
synced 2024-11-24 12:03:31 +08:00
[MSGINA] Allow to pair FriendlyShutDownDlg with 'Server' CORE-17282
A ros specific addition that does not exist on Windows.
Default for Server is still the classic shutdown dlg,
no change on that.
But interested users can manually now create the registry setting
"EnforceFriendlyShutdown" REG_DWORD to "1"
within "SYSTEM\\CurrentControlSet\\Control\\Windows"
to allow overriding the Windows default behavior
without relying on changing the product version number, because
that would not be side-effect-free.
Addendum to 0.4.15-dev-650-g
2edcb58e65
This commit is contained in:
parent
e1a01de7f7
commit
d2bbf54b6f
@ -100,7 +100,6 @@ IsFriendlyUIActive(VOID)
|
||||
HKEY hKey;
|
||||
LONG lRet;
|
||||
|
||||
/* Check product version number first */
|
||||
lRet = RegOpenKeyExW(HKEY_LOCAL_MACHINE,
|
||||
L"SYSTEM\\CurrentControlSet\\Control\\Windows",
|
||||
0,
|
||||
@ -109,6 +108,25 @@ IsFriendlyUIActive(VOID)
|
||||
if (lRet != ERROR_SUCCESS)
|
||||
return FALSE;
|
||||
|
||||
/* CORE-17282 First check an optional ReactOS specific override, that Windows does not check.
|
||||
We use this to allow users pairing 'Server'-configuration with FriendlyShutdown.
|
||||
Otherwise users would have to change CSDVersion or LogonType (side-effects AppCompat) */
|
||||
dwValue = 0;
|
||||
dwSize = sizeof(dwValue);
|
||||
lRet = RegQueryValueExW(hKey,
|
||||
L"EnforceFriendlyShutdown",
|
||||
NULL,
|
||||
&dwType,
|
||||
(LPBYTE)&dwValue,
|
||||
&dwSize);
|
||||
|
||||
if (lRet == ERROR_SUCCESS && dwType == REG_DWORD && dwValue == 0x1)
|
||||
{
|
||||
RegCloseKey(hKey);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* Check product version number */
|
||||
dwValue = 0;
|
||||
dwSize = sizeof(dwValue);
|
||||
lRet = RegQueryValueExW(hKey,
|
||||
|
Loading…
Reference in New Issue
Block a user