Why is Windows 7 scheduled task running hidden?

I am migrating a system from XP to Windows 7. I ported a scheduled task that worked fine under XP to the Windows 7 environment by re-creating the job in the new scheduled tasks manager, and calling the same batch (.CMD) file. In the task properties General tab, the Hidden checkbox is not checked. The CMD file runs normally (visible) if started from a CMD window prompt or from Explorer.

But when the task is started by the Task Scheduler, it runs hidden. The CMD window is not visible and the UI of the program that it runs (a backup program) is not visible. The processes are listed in Task Manager, and they are running under my user name (not SYSTEM or LOCAL).

Can anyone explain why this task is running hidden, and how I can make it visible?


Solution 1:

I discovered that a task has to be set for "run only when user is logged in" to be visible. Otherwise it is hidden (regardless of the setting of the "Hidden" checkbox).

This is a place where a minor improvement to the UI would make it much clearer. For example, if "Run whether user is logged in or not" is checked, the "Hidden" box also becomes checked. Or just put the phrase "and task will run hidden" after "Run whether user is logged in or not".

See http://technet.microsoft.com/en-us/library/cc722152.aspx for more information.