How to close window with .bat script?
<p>I have ran into a slight problem while configuring some keybinds with my mouse.</p>

<p>The thing I want to achieve is to open the program from the backround(open or closed window) and close it again, but not kill the task(eqivalent to the x-button, so it keeps running in the backround)</p>

<p>I have set up my mouse to start up a application called everything (which is able of very fast file system searches)</p>

<p>I have figured out that with this code:</p>

<pre><code>TASKKILL /F /IM Everything.exe
</code></pre>

<p>which I can run with a macro key I can kill the application. But I dont want to kill the application itself just the window, becase it takes a while to index all the important files once I have to restart it.</p>

<p>So heres the question is there any way to bring up a window/task to the front of the screen or trigger the x button event, without having to kill the entire process ?</p>

<p>Also the Mouse(g600) supports lua scripting, but that is proabbly the more harder way to go about it.</p>