Win7 "Explorer.exe" Question: Multiple instances stay running.

Discussion in 'Windows 7' started by DKnight2066, Sep 15, 2009.

  1. DKnight2066

    DKnight2066 MDL Junior Member

    Jul 19, 2009
    54
    0
    0
    #1 DKnight2066, Sep 15, 2009
    Last edited: Sep 15, 2009
    As the title suggests, I have a question about the "Explorer.exe" process:

    When Windows starts, "Explorer.exe" is automatically started as part of the GUI. Perfectly normal. When I open Windows Explorer to browse my drives, another copy of "Explorer.exe" is loaded into memory. Again, normal.

    What seems abnormal to me is, over time, as I continue to open and close Windows Explorer and browse my drives, multiple instances of "Explorer.exe" remain running in memory, chewing up RAM until I forcibly close them with Task Manager. I counted 4 instances running at once, when I last closed them.

    I've gone down my usual checklist of virus, trojan, worm, rootkit, spyware, and malware scans. All were clean.

    Not having used Vista, and being new to Windows 7, is there something I am missing here? Is it normal for multiple instances of "Explorer.exe" to remain running even when all programs are closed and no file browsing windows are open?

    Ideas/Comments welcomed. :)

    --DKnight

    EDIT: Currently running the x64 edition of Win7 Ultimate, just FYI.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. Mr Jinje

    Mr Jinje MDL Expert

    Aug 19, 2009
    1,773
    1,085
    60
    #2 Mr Jinje, Sep 15, 2009
    Last edited by a moderator: Apr 20, 2017
    Have the same problem

    Here is a poewshell script I use to close all explorer's except the main explorer process. (it will kill all open windows)

    Kill_Stray_Explorer.ps1

    Code:
    Get-Process explorer | Sort-Object -descending CPU | Select-Object -Skip 1 ID | ForEach-Object -Process {Stop-Process -Id $_.ID}
    This should skip over the highest CPU using explorer and kill the rest. Do you know how to enable powershell ?
     
  3. mack

    mack MDL Novice

    Jul 29, 2009
    30
    0
    0
    1 instance of explorer.exe here, no matter what I do.
     
  4. DKnight2066

    DKnight2066 MDL Junior Member

    Jul 19, 2009
    54
    0
    0
    Just throw that code into a text file with .ps1 extention, then click Run With PowerShell, right? I'll give this a try, thanks. :)

    --DKnight
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. FireSokar

    FireSokar MDL Member

    May 1, 2009
    116
    0
    10
    Check

    Double check and make sure both explorer.exe are the right files you can do it simply by click open file location from taskmgr on each instance.
     
  6. Mr Jinje

    Mr Jinje MDL Expert

    Aug 19, 2009
    1,773
    1,085
    60
    Sounds like you know what you are doing. Did it work. ?
     
  7. Phazor

    Phazor MDL Expert

    Sep 1, 2009
    1,145
    517
    60
    Could it be that you have this option enabled?
     

    Attached Files:

    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. Mr Jinje

    Mr Jinje MDL Expert

    Aug 19, 2009
    1,773
    1,085
    60
    Phazor, yes that is part of it, but the problem is when we close a window the exe hangs around, I have seen about 10-15 strays in taskmgr, even when I have no windows open.
     
  9. Phazor

    Phazor MDL Expert

    Sep 1, 2009
    1,145
    517
    60
    Well thats certainly a bug then...
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  10. Voiture Lumiere

    Voiture Lumiere MDL Member

    May 31, 2009
    107
    2
    10
    I only have 2 "Explorer.exe" running, but it doesn't terminate when the windows are closed as well.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  11. orhtejgalen

    orhtejgalen MDL Novice

    Aug 9, 2009
    5
    0
    0
    I'm also running Windows 7 Ultimate X64 and i had this problem before. What actually caused it is when I enabled the "Trick to Open Computer or Documents as Default Instead of Libraries Folder with Windows Explorer on Windows 7" found on this guide: http://www.mydigitallife.net/2009/0...es-folder-with-windows-explorer-on-windows-7/

    I removed it and everything went back to normal. No more multiple explorer.exe.

    Hope this helps you.
     
  12. Searinox

    Searinox MDL Junior Member

    Jul 29, 2009
    57
    1
    0
    Multiple explorer instances can be launched by applications that call on it in an improper way. One example is uTorrent, which launches +1 explorer no matter what when you click 'open containing folder'. Also it must be noted that on 64bit some programs that normally pop up explorer windows will launch the 32-bit version of explorer. This can be seen in the task manager as "explorer.exe *32".

    You can thus have one explorer for the desktop, one for folders, and an x32 explorer if launched by some programs.
     
  13. DKnight2066

    DKnight2066 MDL Junior Member

    Jul 19, 2009
    54
    0
    0
    #13 DKnight2066, Sep 15, 2009
    Last edited: Sep 15, 2009
    (OP)
    Lots of replies since I went to bed last nite. :cool:

    @Mr Jinje - I tried your code snippet via PowerShell, but it errors out with 4 lines of red text inside the dos window, then the window disappears before I can read the exact message. Gonna try to cut+paste code into an already-running PowerShell window, instead of running via a file on my desktop.

    @orhtejgalen - Just read your linked article. Cool stuff. :)
    Having Windows Explorer default to My Computer, rather than Libraries which I don't use, helps me move around abit faster.
    However, it hasn't solved the multiple-explorer-copies issue, sadly.

    @Searinox - I do use uTorrent on a regular basis. However, I tend to keep it running in the background and forget about it. I think I've used "Open Containing Folder" on a torrent within uTorrent twice in the last 3 weeks or so. You were right on it opening a new instance of explorer.exe with each click of "Open containing Folder". I can also confirm that after uTorrent opens another Explorer.exe process, when I close that window, the Process still runs in the background until I close it.

    All versions of Explorer.exe that I see running are always x64. I never see "32" next to them.

    - - - - -

    At this point I'm sure uTorrent is causing part of the problem, but it still doesn't explain why I can browse via My Computer normally, and Explorer.exe stays open at-random after closing. (no uTorrent running)
    I'll keep poking around and post again if I find anything interesting. Thanks for the responses folks. :)

    --DKnight

    EDIT:
    @Phazor - Just checked for that, and yes, somehow that was enabled. That's not a setting I normally mess with; is that enabled by default? Anyway, it's off now and I'll keep testing.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  14. Mr Jinje

    Mr Jinje MDL Expert

    Aug 19, 2009
    1,773
    1,085
    60
    Thought that might happen, if you want to enable PS1 files, just need change security level to "RemoteSigned". It will ask if you are sure and you will type "Y" for yes.

    Set-ExecutionPolicy RemoteSigned
     
  15. DKnight2066

    DKnight2066 MDL Junior Member

    Jul 19, 2009
    54
    0
    0
    #15 DKnight2066, Sep 15, 2009
    Last edited by a moderator: Apr 20, 2017
    (OP)
    @Mr Jinje - Just ran that command, then tried your original code snippet again, and errored out with this text:

    Code:
    "Windows PowerShell
    Copyright (C) 2009 Microsoft Corporation. All rights reserved.
    
    PS C:\Users\DKnight2066> Set-ExecutionPolicy RemoteSigned
    
    Execution Policy Change
    The execution policy helps protect you from scripts that you do not trust.
    Changing the execution policy might expose you to the security risks described
    in the about_Execution_Policies help topic. Do you want to change the execution
     policy?
    [Y] Yes  [N] No   Suspend  [?] Help (default is "Y"): y
    
    PS C:\Users\DKnight2066> Get-Process explorer  Sort-Object -descending CPU  Sele
    ct-Object -Skip 1 ID  ForEach-Object -Process {Stop-Process -Id $_.ID}
    
    Get-Process : Cannot evaluate parameter 'Name' because its argument is specifie
    d as a script block and there is no input. A script block cannot be evaluated w
    ithout input.
    At line:1 char:101
    + Get-Process explorer  Sort-Object -descending CPU  Select-Object -Skip 1 ID
    ForEach-Object -Process <<<<  {Stop-Process -Id $_.ID}
        + CategoryInfo          : MetadataError: (:) [Get-Process], ParameterBindi
       ngException
        + FullyQualifiedErrorId : ScriptBlockArgumentNoInput,Microsoft.PowerShell.
       Commands.GetProcessCommand
    
    PS C:\Users\DKnight2066>"
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  16. Voiture Lumiere

    Voiture Lumiere MDL Member

    May 31, 2009
    107
    2
    10
    Hi, i sort of tested it out and it seems that "explorer.exe" for folder(s) will end itself automatically in around 1 min.
    Looks like it's just not as responsive compared to vista/xp, future ms updates should fix it.=)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  17. Mr Jinje

    Mr Jinje MDL Expert

    Aug 19, 2009
    1,773
    1,085
    60
    #17 Mr Jinje, Sep 15, 2009
    Last edited by a moderator: Apr 20, 2017
    Code:
    Get-Process explorer  Sort-Object -descending CPU  Select-Object -Skip 1 ID  ForEach-Object -Process {Stop-Process -Id $_.ID}
    You are missing the pipe character "|" and that is causing error. It's the key above "Enter" key (hold shift)

    This should work

    Code:
    Get-Process explorer | Sort-Object -descending CPU | Select-Object -Skip 1 ID | ForEach-Object -Process {Stop-Process -Id $_.ID}
    3rd time is for to charm. :D
     
  18. DKnight2066

    DKnight2066 MDL Junior Member

    Jul 19, 2009
    54
    0
    0
    Agreed, it worked this time. Code ran with no errors, then the Powershell box closed itself.

    Thanks. :)

    --DKnight
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  19. crashburn162

    crashburn162 MDL Novice

    Apr 6, 2010
    1
    0
    0
    I have the same problem tried the code with the powershell I still get the extra explorer when I use "open containing folder" in Utorrent and it doesn't close I tried "%SystemRoot%\explorer.exe /n,::{450D8FBA-AD25-11D0-98A8-0800361B1103}" in the systemroot of the explorer still nothing any other ideas?
     
  20. MadSheep!

    MadSheep! MDL Junior Member

    Jul 12, 2009
    72
    23
    0
    #20 MadSheep!, May 25, 2010
    Last edited by a moderator: Apr 20, 2017
    Here is a bat file that closes all explorer.exe instances and starts a new one :)

    Copy all lines in a txt file and rename to kill_explorer.bat
    (bat must be in the windows partition)
    Code:
    @echo off
    taskkill /F /IM explorer.exe
    start \windows\explorer.exe