Why is Windows 7 scheduled task running hidden?

15

2

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?

tim11g

Posted 2009-12-03T17:03:52.397

Reputation: 1 306

Answers

22

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.

tim11g

Posted 2009-12-03T17:03:52.397

Reputation: 1 306

7Otherwise it is hidden (regardless of the setting of the "Hidden" checkbox). That’s because the Hidden checkbox has nothing to do with how the program is displayed when it is run, it determines whether the Task is Displayed in the Task Scheduler or not. When it is checked, the task is only visible if you select Show Hidden Tasks from the View menu. – Synetech – 2015-10-02T20:48:23.633

1Wow.. FINALLY got my startup script to work - I think. And just because I had it set to run always no matter if I was logged on or not I could never figure out why it didn't run. Thanks, tim11g! Now my script wake up when it's asleep and do what it needs to do.. – Malachi – 2018-03-01T21:39:06.113