Windows Task Schedule not launching application

~OSD~ 2,126 Reputation points
2021-02-05T10:02:48.897+00:00

Hi,

I am stuck with a very basic thing, the Windows Task Schedule to run an application recurring. Initially I thought it's my custom application that is malfunctioning, then I used Notepad /MsPaint /CMD.exr but same results.
What I am looking for is to launch an application after 5 minutes.

See the exported task in XML format and let me know what might I am doing wrong?

https://1drv.ms/u/s!Amy6U9MHbS_NhAWlbRJ32mRROjOB?e=AYAB47

Though MSpaint /Notepad do not required Administrative privileges but I would like to execute the application with admin rights, any thoughts?

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
10,689 questions
Windows 10 Setup
Windows 10 Setup
Windows 10: A Microsoft operating system that runs on personal computers and tablets.Setup: The procedures involved in preparing a software program or application to operate within a computer or mobile device.
1,909 questions
Windows 10 Security
Windows 10 Security
Windows 10: A Microsoft operating system that runs on personal computers and tablets.Security: The precautions taken to guard against crime, attack, sabotage, espionage, or another threat.
2,765 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,387 questions
0 comments No comments
{count} votes

9 answers

Sort by: Most helpful
  1. MotoX80 32,076 Reputation points
    2021-02-05T13:09:04.237+00:00

    You have it set to run if the user is logged on or not. If you are expecting the notepad window to pop up and be visible, you have to set it to "Run only when user is logged on". Otherwise it will run in the "background" unattached to any user. Check the task manager and see if you have a bunch on notepad's running.

    Make sure that you enabled task history and then check the history tab to the task. Also look at the "next run time"

    64603-capture1.jpg


  2. ~OSD~ 2,126 Reputation points
    2021-02-05T13:56:55.243+00:00

    Thanks for reply.

    According to your suggestion, I have changed the modifications and current user (local admin) is selected.
    64573-image.png

    I can see in history the next schedule but Notepad never appears in UI nor in background.

    64554-image.png


  3. MotoX80 32,076 Reputation points
    2021-02-05T22:13:46.573+00:00

    All I need is run a task without any prompts or UI (hidden) with highest privilege's

    Then let's test with c:\windows\system32\whoami.exe. That is a command line program which will run and then go away. Notepad/MSPaint are GUI programs and will launch and then sit there waiting for user input.

    and not bound to a certain user,

    Then set it to run as SYSTEM. You won't have to enter a password and the program should have access to everything on the PC.

    anyone user will be able to run it

    Non-administrators won't see the task or be able to run it. That shouldn't matter because will have it set to run every X minutes.

    If you really need non-admins to run the task, you will have to unlock it using my Powershell script.

    https://social.technet.microsoft.com/Forums/windows/en-US/6b9b7ac3-41cd-419e-ac25-c15c45766c8e/scheduled-task-that-any-user-can-run

    0 comments No comments

  4. ~OSD~ 2,126 Reputation points
    2021-02-06T20:43:03.983+00:00

    Thanks for further advise MotoX80.

    Whoami even didn't worked, see exported TS in xml format.

    s!Amy6U9MHbS_NhAYM-hzqnhbRYKnO

    64854-image.png

    However, TS launched when invoking manually by selecting Run.

    64698-image.png

    0 comments No comments

  5. MotoX80 32,076 Reputation points
    2021-02-06T21:30:18.863+00:00

    I don't know what to tell you. I imported your xml and set it to run in a few minutes. (I created the task around 4:05pm, so I set it to start running at 4:08pm.) I had to hit F5 a few times to get the mmc to refresh, but its running every 2 minutes.

    Is the TOD clock and time zone set ok?

    My laptop is Win10 Home 20H2 10.0.19042.746, but I would expect this to work on really any Windows version.

    64834-capture.jpg

    64766-capture1.jpg

    64767-capture2.jpg

    0 comments No comments