Hey I've got a quick question,
I know that you can start applications minimized through the command prompt with something like:
start /min "" "C:\Windows\notepad.exe"
However is there a way to automatically close the window, now I don't mean kill the process/task. Just close the window. In notepads case this would work the same way as killing the process, but in something that will minimize to a system tray on a window close, like Skype, or Discord for example this wouldn't kill the process but instead just put the task away from sight.
Thanks
This is not possible in batch files alone, instead this script creates a temporary VBScript at %temp%\hidden.vbs
and then passes arguments to it using wscript.exe
This script doesn't minimise it or send it to the system tray, it just hides it and is only visible in Task Manager
@echo off
(echo CreateObject^("Wscript.Shell"^).Run """" ^& WScript.Arguments^(0^) ^& """", 0, False) > "%temp%\hidden.vbs"
set launch=wscript.exe "%temp%\hidden.vbs"
%launch% notepad