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


  1. Posts : 318
    Dual-boot Win 7 & 10, both Pro 64-bit, now with a Hyper-V VM of Win 11
       #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 Computer


  2. Posts : 42,943
    Win 10 Pro (22H2) (2nd PC is 22H2)
       #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 Computers


  3. Posts : 318
    Dual-boot Win 7 & 10, both Pro 64-bit, now with a Hyper-V VM of Win 11
    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 Computer


  4. Posts : 31,611
    10 Home x64 (22H2) (10 Pro on 2nd pc)
       #4

    glnz said:
    ... 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.

    Startup task doesn't work, but putting it in Task Scheduler works-why?-image.png
      My Computers


  5. Posts : 42,943
    Win 10 Pro (22H2) (2nd PC is 22H2)
       #5

    glnz said:
    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 Computers


 

  Related Discussions
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 22:15.
Find Us




Windows 10 Forums