Ruben
Posts: 57
Joined: Fri Apr 10, 2015 2:35 pm

Scheduled Task for All Users

Hallo Team and Users,

wen need a scheduled task that is started everytime a users logs on.
This must work for all users on the machine.

We tried these settings: (Screenshot)

Result: The task is assigned only to the user running the installer. But not for other users.

Could the task start for any user ?

Warm Regards,
Ruben
Attachments
Bildschirmfoto 2017-08-29 um 09.55.23.png
Bildschirmfoto 2017-08-29 um 09.55.23.png (22.27 KiB) Viewed 48982 times
Sorin
Posts: 663
Joined: Mon May 08, 2017 1:03 pm

Re: Scheduled Task for All Users

Hello Ruben,

Taking into consideration your requirements I would recommend running this task on LocalSystem account. If you decide to do so, just go to "Scheduled tasks" page, double click on the task and go to "Account" tab. Leave the "User" field empty.

However, as a workaround you could configure the scheduled task to run on LocalSystem Account. In this way the task will run at every user logon but on LocalSystem account. Please note that if you configure a task to run under LocalSystem, the GUI of the application launched by the task will be hidden.

Another method would be to avoid using our "Scheduled Tasks" feature and to add a shortcut of the file launched by the scheduled task in the alluser start-up folder: C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup

Please take a look here : How to launch application at logon/startup

Best regards,
Sorin
Sorin Stefan - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Ruben
Posts: 57
Joined: Fri Apr 10, 2015 2:35 pm

Re: Scheduled Task for All Users

Thank you, Sorin.
We need a GUI and your second way seems simple and robust. We'll do that.

Warm Regards,
Ruben
Sorin
Posts: 663
Joined: Mon May 08, 2017 1:03 pm

Re: Scheduled Task for All Users

Hello Ruben,

You are welcome! Please let me know if you have any other questions.

Best regards,
Sorin
Sorin Stefan - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
vmfrt
Posts: 8
Joined: Thu Mar 24, 2022 2:57 pm

Re: Scheduled Task for All Users

Sorin wrote: ↑Tue Aug 29, 2017 2:07 pm Hello Ruben,

Taking into consideration your requirements I would recommend running this task on LocalSystem account. If you decide to do so, just go to "Scheduled tasks" page, double click on the task and go to "Account" tab. Leave the "User" field empty.

However, as a workaround you could configure the scheduled task to run on LocalSystem Account. In this way the task will run at every user logon but on LocalSystem account. Please note that if you configure a task to run under LocalSystem, the GUI of the application launched by the task will be hidden.

Another method would be to avoid using our "Scheduled Tasks" feature and to add a shortcut of the file launched by the scheduled task in the alluser start-up folder: C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup

Please take a look here : How to launch application at logon/startup

Best regards,
Sorin
@sorin Can you share screen shot of gui with this setting ? I want to hide my gui. Advance installer version 19.0
Catalin
Posts: 7845
Joined: Wed Jun 13, 2018 7:49 am

Re: Scheduled Task for All Users

Hello,

If you'd like to hide the GUI, you could follow the steps provided above, namely to run the scheduled task under the LocalSystem account.

As per the following article:

Account Settings Tab
Also, if you want the task to run under the "System Account" leave the "User" and "Password" fields empty.
Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
vmfrt
Posts: 8
Joined: Thu Mar 24, 2022 2:57 pm

Re: Scheduled Task for All Users

Catalin wrote: ↑Fri Mar 25, 2022 10:07 am Hello,

If you'd like to hide the GUI, you could follow the steps provided above, namely to run the scheduled task under the LocalSystem account.

As per the following article:

Account Settings Tab
Also, if you want the task to run under the "System Account" leave the "User" and "Password" fields empty.
Best regards,
Catalin
I have tried with user and password field empty. When I run task, it's status se set Ready again instead of keep Running with Operational code 2. Any help ?
vmfrt
Posts: 8
Joined: Thu Mar 24, 2022 2:57 pm

Re: Scheduled Task for All Users

Sorin wrote: ↑Tue Aug 29, 2017 2:07 pm Hello Ruben,

Taking into consideration your requirements I would recommend running this task on LocalSystem account. If you decide to do so, just go to "Scheduled tasks" page, double click on the task and go to "Account" tab. Leave the "User" field empty.

However, as a workaround you could configure the scheduled task to run on LocalSystem Account. In this way the task will run at every user logon but on LocalSystem account. Please note that if you configure a task to run under LocalSystem, the GUI of the application launched by the task will be hidden.

Another method would be to avoid using our "Scheduled Tasks" feature and to add a shortcut of the file launched by the scheduled task in the alluser start-up folder: C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup

Please take a look here : How to launch application at logon/startup

Best regards,
Sorin
How to mention LocalSystem account ? Through leaving empty user and password fields ?
Catalin
Posts: 7845
Joined: Wed Jun 13, 2018 7:49 am

Re: Scheduled Task for All Users

Hello,
How to mention LocalSystem account ? Through leaving empty user and password fields ?
Yes.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Tim G
Posts: 2
Joined: Tue Sep 10, 2024 10:28 am

Re: Scheduled Task for All Users

Hello Everyone,

per our reuqierements we need to run the Updater for every User on the Machine.
We created a Task, leaving the User field empty, which if I understood correctly should use the LocalSystem User and will not show a GUI to the user.
The task is set to run On Workstation unlock, so I assume it is run every time User Session is continued after locking.

Is there a way to determine that the task was run? I am not sure if I configured this correctly.

Kind regards
Tim
Screenshot 2024-09-10 at 11.31.43.png
Screenshot 2024-09-10 at 11.31.43.png (22.76 KiB) Viewed 18533 times
Screenshot 2024-09-10 at 11.31.52.png
Screenshot 2024-09-10 at 11.31.52.png (10.33 KiB) Viewed 18533 times
Catalin
Posts: 7845
Joined: Wed Jun 13, 2018 7:49 am

Re: Scheduled Task for All Users

Hello Tim and welcome to our forums,

So far, from what I can see, the task is configured correctly.

Now, in order to test this, I would advise:

- creating a new VM or using an existing one if you have one

- run the setup there

- use the Task Scheduler to see if your scheduled task was created

- lock/unlock - here, to be honest, I would have used something like user logon so that we check for updates after each logon

- after doing so, we can:

1. if you have configured the updater to run your package with the log, look for the log file -> if it was created, the v2 package was run

2. wait a bit and check Control Panel to see whether v2 was installed over v1

3. check Event Viewer to see if the application was installed

Hope this helps! :)

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Tim G
Posts: 2
Joined: Tue Sep 10, 2024 10:28 am

Re: Scheduled Task for All Users

Hey Catalin,

thanks for your answer. Enabling the Event Viewer to get some logs works just fine.
We were also able to update our application with a newer version, but only once, after it worked once, the event is triggered and exits with Task and Action completed. However, when running our Application, the updater is triggered programmatically by the application and detects the new Version.



The updater is triggered with /silentall
Screenshot 2024-09-18 at 14.09.55.png
Screenshot 2024-09-18 at 14.09.55.png (41.15 KiB) Viewed 17879 times
Task and Action run for a second, I guess without detecting an update.
Screenshot 2024-09-18 at 14.11.33.png
Screenshot 2024-09-18 at 14.11.33.png (32.9 KiB) Viewed 17879 times
We still have two triggers registered
  • unlock
  • logon
If I understood correctly, logon is only triggered when the user logs in for the first time in this session and unlock would keep the the checking period somewhat shorter?
Catalin
Posts: 7845
Joined: Wed Jun 13, 2018 7:49 am

Re: Scheduled Task for All Users

Hey Tim,

You are always welcome!

Glad the Event Viewer was of help for you.

Now, coming back to your question, just to make sure I fully understand what is happening here.

You install v1 and then do the test, the scheduled task launches the updater and it downloads and installs v2, correct?

Now, you upload v3 on your website and try to do the test again, but now the updater no longer finds the updates? However, if you launch it from your application programatically, it works?

If that's the case, could you please add the "-nofreqcheck" argument to your scheduled task and let me know if that helps?
Screenshot_199.png
Screenshot_199.png (14.02 KiB) Viewed 17374 times

I am thinking that the frequency check might have not passed and therefore it returns nothing.

If that's not your scenario, then please give me some more details.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”