Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've got a daemon process that I run on my machine every hour, and even though I've checked the Hidden box, it doesn't work.Task Properties

Every hour, the task runs, but it shows the black command window, in which my .NET Console app is running. This stays visible until the task completes, and then disappears. This is very annoying, because it pops up and interrupts whatever I'm doing:

enter image description here

I really do want it hidden, so how can I fix this?

share|improve this question
    
possible duplicate of Stop taskeng.exe window from popping up –  Ƭᴇcʜιᴇ007 Sep 22 '12 at 17:48
    
The linked question doesn't mention the Hidden setting. –  DragonLord Sep 22 '12 at 20:01
    
@DragonLord You are correct, but it's hard to tell if this question is "Why doesn't Hidden work?", or if it's actually "How do I stop this box from showing?". –  Ƭᴇcʜιᴇ007 Sep 23 '12 at 14:05
    
@techie007: The question is how to make the window hidden, which is what I thought the hidden checkbox does. But that linked article deals with scripts and the command line task scheduler and shell scripts, not the task scheduler GUI shown in my post. Do you know how to use the GUI to accomplish this? –  Joshua Frank Sep 24 '12 at 12:25
    
In most cases you can't do it just from the Task Scheduler GUI. Usually you need to modify the what's being run by the task's Action (ie: a batch file or script) to hide the sub-window that's popping up. That's what the other question covers, and that's why I flagged it as a possible dupe. :) –  Ƭᴇcʜιᴇ007 Sep 25 '12 at 3:03

4 Answers 4

up vote 7 down vote accepted

Okay, after some more research I found this answer on StackOverflow:

To setup a Scheduled Task to run in background, change the User running the task to SYSTEM, and nothing will appear on your screen.

A comment points out that this grants full rights to the task, which could be annoying, but is acceptable in this case.

But still, what does Hidden do, if it doesn't do this? And why would the user account running the program have anything to do with whether it's visible?

share|improve this answer
    
Read my reply above, might explain what it does. –  Karan Sep 21 '12 at 18:56
    
This SU answer touches on the idea of running it as a different user to avoid seeing the output as well. I don't think there's any specific reason to run it as "System", you could make a user just for running that task, with the permissions you choose to grant them. –  Ƭᴇcʜιᴇ007 Sep 25 '12 at 3:07
    
But why would the configured user affect the visibility of the window? –  Joshua Frank Sep 25 '12 at 14:42

Why is Windows 7 scheduled task running hidden? should explain why this happens.

Also, this TechNet description of General Task Properties states:

The general properties of a task are displayed on the General tab of the Task Properties or Create Task dialog box. The general properties of a task include the task name, author, description, security options, the operating system that the task is configured for, and a property that controls whether the task is hidden.

When you create a task in a task folder, you must name the task. No two tasks can have the same name if they are in the same task folder. The task description is optional.

Task security options specify the security context that the task runs under. For more information, see Task Security Context.

By default, hidden tasks are not shown in the Task Scheduler user interface. You can view hidden tasks when Show Hidden Tasks is selected in the View menu. You make a task hidden when you click the Hidden check box on the General tab of the Task Properties or Create Task dialog box.

Doesn't this imply that the checkbox only hides the task itself from the scheduler's UI, and not the actual program that's scheduled?

share|improve this answer
    
It does make it sound that way, but it doesn't do that either; I can see the tasks in the Scheduler. It would be an odd UI that worked with objects that you couldn't see. –  Joshua Frank Sep 21 '12 at 18:58
1  
Do you have Show Hidden Tasks checked in the View menu? –  Karan Sep 21 '12 at 19:02
    
Ah, I did, so that explains it. Thanks. Of course, since "Hidden" doesn't do what I thought, I have no need for hidden tasks. Since this is an Admin only tool, and since Admins don't generally like to have things hidden from them, what purpose does a hidden task serve? –  Joshua Frank Sep 21 '12 at 19:19
1  
Who knows, certainly I have never used that option. Your question was the first time I looked it up to see what it did. :) BTW, instead of changing the user to SYSTEM, does selecting "Run whether user is logged on or not" solve the issue? –  Karan Sep 21 '12 at 19:25

Check the "Run whether user is logged on or not" check box and executable will run in the background.

share|improve this answer
    
As simple as that. This answer should be the accepted one. –  rolve Dec 31 '13 at 11:56

"Run whether user is logged on or not" will allow the hidden option to work. Note that you need provide your credentials after you choose this.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.