Windows 10 run an interactive scheduled task to run for any interactive user

I want to setup a windows 10 task scheduler to run a GUI based tasked interactively for any logged on user. Right now we have to explicitly specify the user name, so the task can only be run for this specific user. This scheduled task will be deployed on 1000s of computers for 100s of companies - all Windows 10, but of many, many difference configurations (pro, enterprise, OEM, site modified).

Looking at other scheduled tasks I see two possibilities:

"Builtin\users" - this is used by some office tasks

Will either of these work for my purpose? Are they the "right" group to use that can be deployed on many disparate Win10 installations?

thanks!

• I assume these computers are part of an AD domain, and that you are planning to deploy this via GPO. Is the software already in place on all of the systems? Does the solution have to be through task scheduler or are other solutions acceptable? Mar 6, 2020 at 0:28
• Thanks for the reply. Some of our customers are domain, lots are small and just use workgroup. The deploy of the scheduler task will be through an MSI installer for our product. The solution has to be through task scheduler. Mar 6, 2020 at 18:31

As you want the application to start when any user logs on, I'd suggest the builtin\users security context. If the application needs admin rights, you would need to do a few things differently. Here's an example of the syntax you would use to have notepad run whenever a user logs on:
schtasks /create /ru builtin\users /sc onlogon /tn "Notepad On Logon" /tr C:\windows\system32\notepad.exe
/tr "'C:\path with spaces\myApplication.exe'"
• For me it worked when I replaced C:\windows\system32\notepad.exe with notepad.exe. Jul 30, 2020 at 10:00