Startup task doesn't work, but putting it in Task Scheduler works-why?

  1. glnz's Avatar
    Posts : 107
    Dual-boot Win 7 & 10, both Pro 64-bit
       #1

    Startup task doesn't work, but putting it in Task Scheduler works-why?


    On my Win 10 Pro 64-bit Version 1803 machine with 16GB RAM and an i5 Intel chip, I like Task Manager to start automatically on startup.
    1) If I put its shortcut in the Startup folder, nothing happens.
    2) If I create a TaskScheduler task for it, to start on logon of any user, it works.
    Why the difference?

    Detail:
    1) Win+r, then type shell:startup, then put a shortcut in that "Startup" folder that points to C:\Windows\System32\Taskmgr.exe
    2) In Task Scheduler, create a task as follows:
    Code:
    <?xml version="1.0" encoding="UTF-16"?>
    <Task version="1.4" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
      <RegistrationInfo>
        <Date>2015-10-08T18:02:24.7424228</Date>
        <Author>[MyComputerName]\[MyUserName]</Author>
        <URI>\TaskMgr</URI>
      </RegistrationInfo>
      <Triggers>
        <LogonTrigger>
          <Enabled>true</Enabled>
        </LogonTrigger>
      </Triggers>
      <Principals>
        <Principal id="Author">
          <UserId>S-1-5-21-[More Numbers]-1001</UserId>
          <LogonType>InteractiveToken</LogonType>
          <RunLevel>HighestAvailable</RunLevel>
        </Principal>
      </Principals>
      <Settings>
        <MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy>
        <DisallowStartIfOnBatteries>false</DisallowStartIfOnBatteries>
        <StopIfGoingOnBatteries>false</StopIfGoingOnBatteries>
        <AllowHardTerminate>false</AllowHardTerminate>
        <StartWhenAvailable>true</StartWhenAvailable>
        <RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable>
        <IdleSettings>
          <StopOnIdleEnd>false</StopOnIdleEnd>
          <RestartOnIdle>false</RestartOnIdle>
        </IdleSettings>
        <AllowStartOnDemand>true</AllowStartOnDemand>
        <Enabled>true</Enabled>
        <Hidden>false</Hidden>
        <RunOnlyIfIdle>false</RunOnlyIfIdle>
        <DisallowStartOnRemoteAppSession>false</DisallowStartOnRemoteAppSession>
        <UseUnifiedSchedulingEngine>true</UseUnifiedSchedulingEngine>
        <WakeToRun>true</WakeToRun>
        <ExecutionTimeLimit>PT0S</ExecutionTimeLimit>
        <Priority>7</Priority>
        <RestartOnFailure>
          <Interval>PT1M</Interval>
          <Count>20</Count>
        </RestartOnFailure>
      </Settings>
      <Actions Context="Author">
        <Exec>
          <Command>C:\Windows\System32\Taskmgr.exe</Command>
        </Exec>
      </Actions>
    </Task>
    Thanks.
      My ComputerSystem Spec

  2.    #2

    Hi, I think this will explain that, and offer a way to add a shortcut at startup:
    Create Elevated Shortcut without UAC prompt in Windows 10 | Tutorials
      My ComputersSystem Spec

  3. glnz's Avatar
    Posts : 107
    Dual-boot Win 7 & 10, both Pro 64-bit
    Thread Starter
       #3

    dalchina - thanks for interest. But I think your link is how to do a Task Scheduler entry, which I did and which works.
    The problem remains why my Startup entry didn't work.
    But please correct me if I have it wrong.
      My ComputerSystem Spec

  4. Bree's Avatar
    Posts : 10,810
    10 Home x64 (1809) (10 Pro on 2nd pc)
       #4

    glnz said: View Post
    ... I like Task Manager to start automatically on startup....
    Yes, so do I.
    ... If I put its shortcut in the Startup folder, nothing happens....
    Yes, I found that too. So instead I put a .bat file in the AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Start-up folder, containing:

    START /MIN TASKMGR

    (I like it to start minimised on the Taskbar)

    After a while I got tired of seeing a command window open every time I signed in, so I moved the .bat file out of the Start-up folder into ...\Start Menu\Programs. I then put a shortcut to the .bat file in ...\Start Menu\Programs\Start-up. This meant that I could set the properties of the shortcut to run the .bat file minimised.

    Click image for larger version. 

Name:	image.png 
Views:	16 
Size:	25.2 KB 
ID:	227916
      My ComputersSystem Spec

  5.    #5

    glnz said: View Post
    dalchina - thanks for interest. But I think your link is how to do a Task Scheduler entry, which I did and which works.
    The problem remains why my Startup entry didn't work.

    But please correct me if I have it wrong.
    I suggest the explanation as to why it doesn't work which you sought is in the text of the tutorial:

    In addition, Windows will not allow elevated apps to run at startup by default.
    If you want to run an app as administrator (elevated) without getting a UAC prompt or at startup, then you can create an elevated task to run the application as a workaround to do so.
      My ComputersSystem Spec


 

Related Threads
Task Scheduler will not run a .bat or .vbs on startup; both were tested with Task Scheduler Run.
I have an old programme "Spotmau desktop secretary free" that works fine once it launches. Unfortunately the option to automatically launch it when I log on to windows does not work on windows 10. So I tried to use task scheduler. However, no matter...
Task Scheduler doesn't run program in Performance & Maintenance
I'm running a task schedule to run a program at a certain time. It worked great in windows 7 but since I upgraded to 10 nothing happens when the task is run. I've run SFC and Dism see below and no problems found. C:\WINDOWS\system32>sfc /scannow...
Is there a way to make the "Command Prompt" window show when I have a task running in Windows task Scheduler? I would like to be able to view the progress of the task. For example, I have a program called "Zap2xml" that collects TV EPG data. It...
My issue is kind of strange. I am an insider currently on Windows 10 build 10240. All the build I have tried so far has this same error in task scheduler when I change my time zone to my current location which is kathmandu (UTC+5:45). When i change...
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 09:27.
Find Us