I have the requirement to create a scheduled tasks that runs once when a particular user logs on. The intention is to start a task only for a particular user.
I know that I can use the Task Scheduler to create a Task with a trigger At log on and under Settings, I specify the particular user.
However, because I need this created during an install routine, it must be created automatically, using the command line, for example using the schtasks command. It is possible to create a task executed at log on using the following example:
schtasks /Create /TR executable.exe /RU user /TN name /SC ONLOGON
But I did not find any modifier to specify a particular user for the ONLOGON trigger.
Resources:
Do you know if there is any undocumented switch? Or any other commandline tool that provides the necessary features?
Thanks.