locked
BAT File issue RRS feed

  • Question

  • Hi,

    I am trying to close ie browser through BAT File.when i double click the Bat file,seems its not working.

    If i try the command (taskkill -f -im iexplore.exe) in RUN,it works fine and if i try the same in Cmd prompt getting below error

    "taskkill" not rgognised as internal or external command.

    Can any one please provide the solution for this issue.

    Tuesday, November 1, 2016 6:48 AM

All replies

  • This may depend on where you're running it from, could you try using the following command:

    C:\Windows\System32\cmd.exe /c C:\Windows\System32\TASKKILL.exe /F /IM iexplore.exe

    See if it works when explicitly stating the paths.

    Hope this helps!


    Rory Fewell

    (CCNA, MOS)

    Windows Server 2012 and Networking Fundamentals Apprentice

    Visit my site!

    View me on GitHub!

    Tuesday, November 1, 2016 7:05 AM
  • Hi Magesh Chandran,

    If you want to use bat file to close the IE. We could use the example to achieve. Please copy the information into the txt file and rename it .bat file.

    @echo off

    echo(

    echo            Hit any Key to kill all instances of Internet Explorer

    Pause>nul

    Cls & Color 0C

    echo(

    echo              Killing Internet Explorer Please wait for a while ...

    Taskkill /IM "iexplore.exe" /F

    Pause

    Hope it will be helpful to you


    Please remember to mark the replies as an answers if they help and unmark them if they provide no help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Wednesday, November 2, 2016 7:19 AM
  • Hi Magesh Chandran,

    Haven't received your message a few days, was your issue resolved?
    I am proposing previous helpful replies as "Answered". Please feel free to try it and let me know the result. If the reply is helpful, please remember to mark it as answer which can help other community members who have same questions and find the helpful reply quickly.
    Best regards,
    Carl Fan


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Thursday, November 10, 2016 9:48 AM