Restart explorer.exe Process in Windows 10  

Page 4 of 7 FirstFirst ... 23456 ... LastLast

  1. Posts : 68,985
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #30

    Try3 said:
    Sorry. Perhaps I'm overdue my eyesight test.

    All the best,
    Denis
    No worries mate.
      My Computers


  2. Posts : 3
    Windows 10 Pro
       #31

    I created a version of this that re-opens explorer to the folder or item the context menu was triggered from. So it will restart explorer completely, then launch explorer to where you left off to avoid the need to refind the last place you were working.

    If anyone likes this let me know.



    You can find my script on my pastebin profile: Add_Restart_Explorer_Context_Menu.reg - Pastebin.com
    Last edited by SlyFox1186; 14 May 2021 at 20:43. Reason: re-uploaded the script and it changed the URL
      My Computer


  3. Posts : 312
    Microsoft Win 10
       #32

    Thanks!
      My Computer


  4. Posts : 18,044
    Win 10 Pro 64-bit v1909 - Build 18363 Custom ISO Install
       #33

    Hello @dooley2009,

    dooley2009 said:
    I created a version of this that re-opens explorer to the folder or item the context menu was triggered from. So it will restart explorer completely, then launch explorer to where you left off to avoid the need to refined the last place you were working.

    If anyone likes this let me know.

    You can find my script on my pastebin profile: Add_Restart_Explorer_Context_Menu.reg - Pastebin.com
    Very nice Script and work, thanks for sharing.
      My Computer


  5. Posts : 16,950
    Windows 10 Home x64 Version 22H2 Build 19045.4170
       #34

    Paul Black said:
    Very nice Script and work, thanks for sharing.
    Paul,

    If you are interested in restarting explorer & re-opening File explorer windows more directly [i.e. without use of the context menu] then see Keith's script - post #19

    Denis
      My Computer


  6. Posts : 18,044
    Win 10 Pro 64-bit v1909 - Build 18363 Custom ISO Install
       #35

    Thanks Denis,

    Try3 said:
    If you are interested in restarting explorer & re-opening File explorer windows more directly [ i.e. without use of the context menu ] . . .

    I do already have one that I created in my Toolbar that I use. It is just nice to see the different variations that members come up with to perform the same task.

    Mine > Kill and Restart Explorer.

      My Computer


  7. Posts : 521
    Win7 Pro X64, Win10 Pro x640
       #36

    How would one make a right-click context menu entry to restart explorer and re-open previously open windows, using @KeithM's PS script?

    Code:
    Shell = New-Object -ComObject shell.application
    $SavedPaths = ( $Shell.Windows() | select -expand LocationURL ) -ne ''
    Get-Process explorer | Stop-Process
    $SavedPaths | ForEach { explorer $_ }
    Thanks!
      My Computer


  8. Posts : 7,607
    Windows 10 Home 20H2
       #37

    Code:
    (REG Add "HKCR\Directory\Background\shell\Restart Explorer\Command" /VE /D "PowerShell.exe -ExecutionPolicy Bypass -noexit -file D:\KeithM.ps1" /F)

    Copy KeithM's script into this file: D:\KeithM.ps1
      My Computer


  9. Posts : 521
    Win7 Pro X64, Win10 Pro x640
       #38

    Matthew Wai said:
    Code:
    (REG Add "HKCR\Directory\Background\shell\Restart Explorer\Command" /VE /D "PowerShell.exe -ExecutionPolicy Bypass -noexit -file D:\KeithM.ps1" /F)

    Copy KeithM's script into this file: D:\KeithM.ps1
    I will try it out this evening. Thanks!

    - - - Updated - - -

    bamajon1974 said:
    I will try it out this evening. Thanks!
    @KeithM, @Matthew Wai
    Three problems:
    1. When I restart explorer, I get the following PowerShell error message:
    Code:
    Shell : The term 'Shell' is not recognized as the name of a cmdlet, function, script file, or operable program. Check
    the spelling of the name, or if a path was included, verify that the path is correct and try again.
    At C:\KeithM.ps1:1 char:1
    + Shell = New-Object -ComObject shell.application
    + ~~~~~
        + CategoryInfo          : ObjectNotFound: (Shell:String) [], CommandNotFoundException
        + FullyQualifiedErrorId : CommandNotFoundException
    
    You cannot call a method on a null-valued expression.
    At C:\KeithM.ps1:2 char:1
    + $SavedPaths = ( $Shell.Windows() | select -expand LocationURL ) -ne ' ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
        + FullyQualifiedErrorId : InvokeMethodOnNull
    2. Regardless of what directory is open, the command defaults to open This PC

    3. The Powershell window persists after the operation.

    Any ideas?

    Thanks!
      My Computer


  10. Posts : 7,607
    Windows 10 Home 20H2
       #39

    bamajon1974 said:
    1. When I restart explorer, I get the following PowerShell error message:
    In KeithM's script, replace the first line with the following line:

    $Shell = New-Object -ComObject shell.application

    Note that a dollar sign has been added at the beginning. That will also solve the problem mentioned in your question 3.

    bamajon1974 said:
    2. Regardless of what directory is open, the command defaults to open This PC
    @KeithM's script does not work as intended. Something is possibly missing.
      My Computer


 

Tutorial Categories

Restart explorer.exe Process in Windows 10 Tutorial Index Network & Sharing Instalation and Upgrade Browsers and Email General Tips Gaming Customization Apps and Features Virtualization BSOD System Security User Accounts Hardware and Drivers Updates and Activation Backup and Restore Performance and Maintenance Mixed Reality Phone


  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 16:00.
Find Us




Windows 10 Forums