I have powershell script with GUI form which show message by condition. This script is runnig through the task scheduler every 15 minutes. Every running shows me concole window, then GUI form with message and then console closed. This behavior irritate me. I'd like to hide console and display only GUI form. I tried runnig with argument "-WindowsStyle Hidden" but it didn't help.
How to hide this console window?
cmd.exe
with the arguments of/C START "" powershell -NoLogo -WindowStyle Hidden "C:\gui.ps1"
-- note that the console window will flash (incredibly briefly) and then close whilst thegui.ps1
executes.