Kill and Restart Explorer.

  1. Paul Black's Avatar
    Posts : 12,985
    Win 10 Pro 64-bit v1909 - Build 18363 Custom ISO Install
       #1

    Kill and Restart Explorer.


    I have a Toolbar Shortcut to Kill and Restart Explorer.

    The below does NOT work when entered into the Target [ Start In: C:\Windows\system32 ] . . .

    Code:
    
    C:\Windows\System32\taskkill.exe /f /im explorer.exe && start explorer.exe

    . . . but these do . . .

    Code:
    
    cmd.exe /c taskkill.exe /f /im explorer.exe && start explorer.exe
    cmd.exe /c C:\Windows\System32\taskkill.exe /f /im explorer.exe && start explorer.exe

    I am just curious why the FIRST one does NOT work?

    I have also noticed that explorer.exe is NOT in the System32 directory [ I have ALL files unhidden ].

    Thanks.
      My Computer

  2. Try3's Avatar
    Posts : 8,326
    Windows 10 Home x64 Version 21H1 Build 19043.1052
       #2

    Paul,

    explorer.exe is in C:\Windows

    All the best,
    Denis
    Last edited by Try3; 11 May 2021 at 06:45.
      My Computer

  3. Matthew Wai's Avatar
    Posts : 5,698
    Windows 10 Home 20H2
       #3

    Paul Black said:
    I am just curious why the FIRST one does NOT work?
    The shortcut does not know that cmd.exe is necessary for taskkill.exe.
      My Computer

  4. Try3's Avatar
    Posts : 8,326
    Windows 10 Home x64 Version 21H1 Build 19043.1052
       #4

    When you have tested your revised version, you might like to report it at
    Restart explorer.exe Process - TenForumsTutorial

    The shortcut can contain this [it does not need Admin permission]
    Code:
    cmd.exe /c "taskkill.exe /f /im explorer.exe && start explorer.exe"
    and I'm surprised that you get away with omitting the " enclosing the command itself in your version. cmd.exe is clearly more tolerant than it used to be [XP?/Win7?].

    Personally, I run a KeithM PS script that re-opens File explorer windows after explorer.exe restarts - post #25

    Denis
    Last edited by Try3; 11 May 2021 at 06:37.
      My Computer

  5. dalchina's Avatar
    Posts : 31,193
    Win 10 Pro (1903)
       #5

    Easy context menu (free) allows you to add this as a context menu:
    Kill and Restart Explorer.-untitled.png
      My Computers

  6. Paul Black's Avatar
    Posts : 12,985
    Win 10 Pro 64-bit v1909 - Build 18363 Custom ISO Install
    Thread Starter
       #6

    Try3 said:
    explorer.exe is in C:\Windows

    Thanks Denis, I am having one of those days.



    Matthew Wai said:
    The shortcut does not know that cmd.exe is necessary for taskkill.exe.

    These DO work . . .

    Code:
    
    cmd.exe /c taskkill.exe /f /im explorer.exe && start explorer.exe
    cmd.exe /c C:\Windows\System32\taskkill.exe /f /im explorer.exe && start explorer.exe



    Try3 said:
    When you have tested a revised version, you might like to report it at
    Restart explorer.exe Process - TenForumsTutorial

    Code:
    cmd.exe /c "taskkill.exe /f /im explorer.exe && start explorer.exe"

    Personally, I run a KeithM PS script that re-opens File explorer windows after explorer.exe restarts - post #25

    Thank you I will. Perhaps Brink can add it as an Option in the Tutorial.



    dalchina said:
    Easy context menu (free) allows you to add this as a context menu:
    Kill and Restart Explorer.-untitled.png

    Thanks, but I specifically want it in my Toolbar



    Thanks everyone.
      My Computer

  7. Brink's Avatar
    Posts : 57,727
    64-bit Windows 10 Pro for Workstations build 21390
       #7
      My Computers

  8. Paul Black's Avatar
    Posts : 12,985
    Win 10 Pro 64-bit v1909 - Build 18363 Custom ISO Install
    Thread Starter
       #8

    Hello @Brink ,

    Thank you.

    The only reason I posted that in the other thread was because it did NOT work in a Toolbar Shortcut, but the new method I came up with did.
      My Computer


 

  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 15:24.
Find Us




Windows 10 Forums