For running the program minimized using the cmd.exe /C start /MIN, the focus of the window still changes since the first cmd.exe is launched in a real window. You can avoid this by using the vbscript with WScript.exe:
1. Create a .vbs script to the folder/name of your choice, I use startprocess.vbs in my example.
Code:
Option Explicit
Dim oShell 'WScript.Shell object
Dim iOption 'WScript.shell.run visibility option
'For iOption, see https://technet.microsoft.com/en-us/library/ee156605.aspx
Set oShell = CreateObject("WScript.Shell")
If WScript.Arguments.Count >0 Then
If WScript.Arguments.Count > 1 then
iOption = CLng(WScript.Arguments.Item(1))
oShell.run WScript.arguments.item(0), iOption
Else
oShell.run WScript.arguments.item(0)
End If
End If
2. Create launcher for the script to run your program
wscript.exe /B /NoLogo [path]/startprocess.vbs "your command here with parameters" 7
e.g. wscript.exe /B /NoLogo "C:\Windows\System32\cmd.exe /C MyStartup.cmd > C:\Temp\MyStartup.log" 7
Now you can place the launcher to the Windows Task Scheduler (or any other place) and your command with parameters will be run minimized without changing the focus of the windows i.e. your work is not affected by the running process. This is due to the fact that wscript.exe does not create any windows when run with the batch mode with /B option.
Script does not contain any error handling or other additional stuff.
What the script does it uses the first argument (if it exist) as a full command line for launching the command and the second parameter as WShell.exec visibility option (
https://technet.microsoft.com/en-us/library/ee156605.aspx)
When using with the Windows Task Schedule, you place
C:\Windows\System32\wscript.exe
as executable and the rest of the parameters as arguments, in my example
/B /NoLogo "C:\Windows\System32\cmd.exe /C MyStartup.cmd > C:\Temp\MyStartup.log" 7