mirror of
https://github.com/reactos/reactos.git
synced 2025-02-28 19:32:59 +00:00
[EXPLORER] Remove redundant bIsSystemShell assignments (#7542)
Addendum to commit df197bc42
(PR #7502)
CORE-19887
This commit is contained in:
parent
76014b92a4
commit
e51e5de1f8
1 changed files with 4 additions and 10 deletions
|
@ -99,13 +99,9 @@ IsExplorerSystemShell()
|
|||
LPWSTR szExplorer = PathFindFileNameW(szPath);
|
||||
|
||||
HKEY hKeyWinlogon;
|
||||
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"Software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon",
|
||||
0, KEY_READ, &hKeyWinlogon) != ERROR_SUCCESS)
|
||||
{
|
||||
// No registry access.
|
||||
bIsSystemShell = TRUE;
|
||||
}
|
||||
else
|
||||
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE,
|
||||
L"Software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon",
|
||||
0, KEY_READ, &hKeyWinlogon) == ERROR_SUCCESS)
|
||||
{
|
||||
LSTATUS Status;
|
||||
DWORD dwType;
|
||||
|
@ -116,9 +112,7 @@ IsExplorerSystemShell()
|
|||
Status = RegQueryValueExW(hKeyWinlogon, L"Shell", 0, &dwType, (LPBYTE)szShell, &cbShell);
|
||||
if (Status == ERROR_SUCCESS)
|
||||
{
|
||||
if ((dwType == REG_SZ || dwType == REG_EXPAND_SZ) && StrStrI(szShell, szExplorer))
|
||||
bIsSystemShell = TRUE;
|
||||
else
|
||||
if ((dwType != REG_SZ && dwType != REG_EXPAND_SZ) || !StrStrIW(szShell, szExplorer))
|
||||
bIsSystemShell = FALSE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue