mirror of
https://github.com/reactos/reactos.git
synced 2025-05-19 17:14:32 +00:00
- the shell should load from 'Windows NT' key, not 'Windows'
- this should fix loading cmd instead of explorer from the key. svn path=/trunk/; revision=33020
This commit is contained in:
parent
cc6f7f3dae
commit
da2959cd0e
1 changed files with 11 additions and 10 deletions
|
@ -133,6 +133,7 @@ cleanup:
|
|||
if (ControlKey != NULL)
|
||||
RegCloseKey(ControlKey);
|
||||
HeapFree(GetProcessHeap(), 0, SystemStartOptions);
|
||||
TRACE("IsConsoleShell() returning %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -150,17 +151,17 @@ BOOL GetShell(
|
|||
|
||||
TRACE("(%p, %p)\n", CommandLine, hRootKey);
|
||||
|
||||
rc = RegOpenKeyEx(hRootKey, REGSTR_PATH_WINLOGON,
|
||||
0, KEY_QUERY_VALUE, &hKey);
|
||||
rc = RegOpenKeyExW(hRootKey, L"Software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon",
|
||||
0, KEY_QUERY_VALUE, &hKey);
|
||||
if (rc == ERROR_SUCCESS)
|
||||
{
|
||||
Size = MAX_PATH * sizeof(WCHAR);
|
||||
rc = RegQueryValueEx(hKey,
|
||||
ConsoleShell ? L"ConsoleShell" : L"Shell",
|
||||
NULL,
|
||||
&Type,
|
||||
(LPBYTE)Shell,
|
||||
&Size);
|
||||
rc = RegQueryValueExW(hKey,
|
||||
ConsoleShell ? L"ConsoleShell" : L"Shell",
|
||||
NULL,
|
||||
&Type,
|
||||
(LPBYTE)Shell,
|
||||
&Size);
|
||||
if (rc == ERROR_SUCCESS)
|
||||
{
|
||||
if ((Type == REG_SZ) || (Type == REG_EXPAND_SZ))
|
||||
|
@ -279,14 +280,14 @@ VOID StartShell(VOID)
|
|||
/* Try to run shell in user key */
|
||||
if (GetShell(Shell, HKEY_CURRENT_USER) && TryToStartShell(Shell))
|
||||
{
|
||||
TRACE("Failed to start a shell from HKEY_CURRENT_USER\n");
|
||||
TRACE("Started shell from HKEY_CURRENT_USER\n");
|
||||
return;
|
||||
}
|
||||
|
||||
/* Try to run shell in local machine key */
|
||||
if (GetShell(Shell, HKEY_LOCAL_MACHINE) && TryToStartShell(Shell))
|
||||
{
|
||||
TRACE("Failed to start a shell from HKEY_LOCAL_MACHINE\n");
|
||||
TRACE("Started shell from HKEY_LOCAL_MACHINE\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue