Hide C# Console App Window When Started by Task Scheduler
Solution 1
Change the output type to Windows application
will solve your problem
Goto : Project - >Project Properties
Solution 2
Check Hidden checkbox, and check the "Run whether user is logged on or not" check box and executable will run in the background.
Solution 3
As a simple partial solution, you can start your application minimized from a task scheduler.
start /min <full path to your app>.exe
It would be present in task bar, but it's main window would not be visible unless user clicks it in the task bar.
Solution 4
If you have access to the code/solution, On ProjectProperties set Output Type as Windows Application.
Solution 5
Set "Run only when user is logged in" to be visible. Set "Run whether user is logged on or not" to be always hidden regardless of the setting of the "Hidden" checkbox.
See http://technet.microsoft.com/en-us/library/cc722152.aspx
user1477388
Authored open-source project PHP One, an MVC framework for PHP designed like Microsoft's ASP.NET MVC. https://github.com/DominicArchual/Php-One
Updated on June 04, 2022Comments
-
user1477388 almost 2 years
I have searched google for this and read some resources but I wasn't able to find a good answer. Does anyone know how to prevent the console app window from opening when it is started by the task scheduler?
-
user1477388 about 11 yearsHow do I declare this via the Task Scheduler UI?
-
user1477388 about 11 yearsThanks for the screenshot; but how will that solve the problem? Will it run it minimized or will it run in the background or something?
-
alex about 11 yearsJust type it into executable program textbox. If "start" would not work by itself, try executing it in a command line interpreter. like this:
cmd /c start /min <full path to your app>.exe
-
Pandian about 11 years@user1477388: It runs like normal but it does not show any screens on front end..
-
user1477388 about 11 yearsYou answered this 6 minutes before the other guy, but he included a screenshot which would probably be helpful to other users who may find this resource. Thanks.
-
Wasted_Coder over 3 yearsThe "Hidden" option on the task, will only hide the task in the task manager GUI. It does nothing to how the Actions are executed. (You can view Hidden Tasks by View > Show Hidden Tasks).