[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:
Hermès Bélusca-Maïto 2018-06-22 16:34:16 +02:00
parent 0a8cd95cad
commit 12de9654b0
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0
3 changed files with 11 additions and 23 deletions

View file

@ -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)