Open manuelmayer-dev opened 2 years ago
This can be done by adding CreateNoWindow = true,
to the ProcessStartInfo created at line 35 in https://github.com/manuelmayer-dev/Macro-Deck-Windows-Utils-Plugin/blob/master/Actions/CommandlineAction.cs so that it reads
StartInfo = new ProcessStartInfo("cmd.exe")
{
UseShellExecute = false,
CreateNoWindow = true,
WorkingDirectory = workingDirectory,
Arguments = "/C " + command,
RedirectStandardOutput = saveVariable,
}
edit: I noticed that I've used both WindowStyle = ProcessWindowStyle.Hidden
and CreateNoWindow = true
in my own code. I suppose that was a mistake, as setting WindowsStyle doesn't make sense if no Window is created.
Will this feature ever be implemented?
Currently commandline commands and applications (even if they support silent mode) are started in the visible window, taking focus onto themself and interrupting fullscreen applications.
It would be great if they would run completely silent in the background. And maybe someone also interested in separate options to run PowerShell and WSL scripts, not only regular command line.#
Issue originally created by @zedalert in the Macro Deck repository