Windows 10 task scheduler won’t run any exe if set to “run whether user is logged in or not”

scheduled-tasks

I have some simple scripts that have been in use on a windows 7 pc for years. I've migrated them to a windows 10 pc and they don't work. I have been pouring over posts related to issues like this and am still no closer to a solution.

At first I thought there was something complicated going on, partially because there are many posts that indicate a variety of fixes. But now it appears that this is a general problem. Here is the simple test to see the issue.

create a basic windows 10 x64 task scheduler task, set it to run "run whether user is logged in or not", and have the action be to execute notepad.exe. I have not found any windows 10 pc that this will work on.

What's odd is that the task will say "running" forever, and notepad.exe appears in the task manager list. But notepad or whatever has been called will never "appear".

As soon as I switch it over to run when the user is logged on it works fine. The success or failure of the tast is not dependent on whether the task is executed via a trigger or manually.

Summary of what I've tried based on suggestions in other's posts:

[1] set the action to run a bat file, where the bat file contains the call to the exe
[2] make sure these folders exist:
C:\Windows\System32\config\systemprofile\Desktop
C:\Windows\SysWOW64\config\systemprofile\Desktop
[3] if attempting to run a 32 bit program, include path to cmd like
C:\windowns\Syswow64\cmd.exe /C
[4] setting to run with highest rights has no impact
[5] domain or local users makes no difference
[6] users running are either domain or local admins according to #5

After reading
https://serverfault.com/questions/251733/task-scheduler-runs-as-hidden-how-to-make-it-visible
I am wondering if task scheduler now makes any ui that is normally presented by the running action invisible if "run whether user is logged in or not" is switched on. Is this all that it is?

Best Answer

What you describe is perfectly logical.

The "run a task whether the user is logged in or not" simply makes the task being run as SYSTEM user, rather than your own user to ensure that the task will run.

Given that you are not the SYSTEM user, the program will never appear to you, but it will still run.

Related Question