New
#1
User-created (sch)tasks Invisible When Run
SCENARIO
On startup several tasks are added to schtasks via a GPO startup script:
schtasks /create /xml "X:\task 1.xml" /ru "COMPUTER NAME\USER NAME" /rp PASSWORD /tn "Imported Task 1"
etc.
Via a batch script in Programs\Startup these tasks are then run:
schtasks /run /tn "Imported Task 1"
etc.
PROBLEM
Although the programs launched by the tasks all run (as the user), they run invisibly and can not be seen (by the user) in Task Manager unless "Show processes from all users" is clicked.
OBSERVATIONS
The tasks were set to "run only when the user is logged on" when they were exported, but after importing they are all set to "run whether the user is logged on or not".
By ending the processes of the tasks in Task Manager, ending the tasks in Task Scheduler and resetting them to "run only when user is logged on" and then running them, the tasks run visibly as intended.
QUESTION
Is there any way to force/import/set tasks to "run only when user is logged on" (from the command line)?