Quantcast
Channel: Active questions tagged windows - Super User
Viewing all articles
Browse latest Browse all 10639

How to make sure a task is run at Windows startup?

$
0
0

I have trouble running a PowerShell script and/or and .exe file on boot with Windows (both win10 and win11). I have tried multiple methods:

  1. Put the script inside shell:startup
  2. Create a task with Task Scheduler
  3. Run the task as a Windows service

Sometimes it runs, sometimes it does not. I have a feeling that Windows runs the task whenever it feel like to do that. On Linux, if I put the task inside cron, it is guaranteed to run.

Here is an example of a Windows service which is not run most of the time (but sometimes it does run):enter image description hereI have tried both Automatic and Automatic (Delayed start), yet the results are the same.

If you are curious, I want to run aria2c.exe in RPC mode, so I create a task in Task Scheduler for it. I also want to run a .ps1 script so I put it inside the startup folder. And the VirtioFS service was created by default by the installer to start a virtual drive at boot. Yet everything behaves out of my control. What could be the cause of the issue?


Viewing all articles
Browse latest Browse all 10639

Trending Articles