mirror of
https://github.com/reactos/reactos.git
synced 2026-06-05 03:02:59 +08:00
[EXPLORER] Simplify the current-shell-is-explorer check when trying to start the auto-start programs, by using the existing code.
This commit is contained in:
@@ -386,21 +386,6 @@ INT ProcessStartupItems(VOID)
|
||||
return res ? 0 : 101;
|
||||
}
|
||||
|
||||
static BOOL IsSelfExplorer(VOID)
|
||||
{
|
||||
WCHAR szPath[MAX_PATH], *pch;
|
||||
static const WCHAR szExplorer[] = L"explorer.exe";
|
||||
|
||||
GetModuleFileName(NULL, szPath, _countof(szPath));
|
||||
|
||||
pch = PathFindFileNameW(szPath);
|
||||
if (pch)
|
||||
{
|
||||
return (StrCmpIW(pch, szExplorer) == 0);
|
||||
}
|
||||
return (StrCmpIW(szPath, szExplorer) == 0);
|
||||
}
|
||||
|
||||
BOOL DoFinishStartupItems(VOID)
|
||||
{
|
||||
if (s_hStartupMutex)
|
||||
@@ -416,7 +401,7 @@ BOOL DoStartStartupItems(ITrayWindow *Tray)
|
||||
{
|
||||
DWORD dwWait;
|
||||
|
||||
if (!IsSelfExplorer())
|
||||
if (!bExplorerIsShell)
|
||||
return FALSE;
|
||||
|
||||
if (!s_hStartupMutex)
|
||||
|
||||
Reference in New Issue
Block a user