How to close Windows Explorer throuth batch file

Discussion in 'Scripting' started by Flipp3r, Oct 16, 2012.

  1. Flipp3r

    Flipp3r MDL Expert

    Feb 11, 2009
    1,544
    662
    60
    I run a number of batch files that I browse & run through Windows Explorer.
    How can I add a command to close Windows Explorer when I run my batch file?
    I've tried killing explorer.exe service but that just stuffs everything up...
     
  2. d.karakasa

    d.karakasa MDL Novice

    Sep 20, 2012
    28
    1
    0
    which OS are you running these from?, XP/7?
     
  3. Josh Cell

    Josh Cell MDL Developer

    Jan 8, 2011
    3,519
    7,110
    120
    #3 Josh Cell, Nov 1, 2012
    Last edited by a moderator: Apr 20, 2017
    Simply adding this command at your batch archive:

    Code:
    TASKKILL /IM "EXPLORER.EXE" /F
    Please note that an Administrator level is needed for taskkill. Windows 8 needs of the user to run batch files as administrator..
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...