Simple .bat file not closing CMD window

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
Ste1337
Posts: 1
Joined: 29 Dec 2015 11:19

Simple .bat file not closing CMD window

#1 Post by Ste1337 » 29 Dec 2015 11:32

Hi, i have quite a simple script for closing multiple programs that could be draining my GPU/CPU and reducing FPS in games.

Here is the script:

start /min cmd.exe
taskkill /im Photoshop.exe
taskkill /im Illustrator.exe
taskkill /im AdobePremierePro.exe
taskkill /im AfterFX.exe
taskkill /im mspaint.exe

I have tried adding "exit" to the end of the script and also "cls" but it still keeps a cmd window open at the bottom of my taskbar.

I am running on Windows 10 and using a shortcut to access to .bat file in a minimized window. The original .bat file is not on my systems hard drive either.

(Preferably i would prefer the cmd window not to pop up at all and just perhaps beep to let me know the script has successfully ran)

Any help would be appreciated thanks :)

Squashman
Expert
Posts: 4486
Joined: 23 Dec 2011 13:59

Re: Simple .bat file not closing CMD window

#2 Post by Squashman » 29 Dec 2015 12:20

Because your first line of code in your batch file is opening a second instance of cmd.exe and basically doing nothing.

Post Reply