mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 09:33:20 +00: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:
parent
0a8cd95cad
commit
12de9654b0
3 changed files with 11 additions and 23 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue