How can I schedule a startup task that requires admin privileges?


  1. Posts : 31
    Windows 10 Pro 64 bit
       #1

    How can I schedule a startup task that requires admin privileges?


    This is something that has bugged me since installing Windows 7 Ultimate with separate admin and user accounts.

    As often recommended for security, I normally log on as a standard user. If I truly want to make a system change, update a program, etc., I am happy to get a prompt for an admin password.

    Where it first became annoying was with TrueCrypt. I wanted it to run at startup so I could (or not) enter a password to mount my favorite volumes. Windows 7 required me to enter an admin password first, just to start up the TrueCrypt program. I futzed and futzed, posted questions online, and one day TC started running as I'd hope. I no longer needed to enter an admin password. Unfortunately, I had tried so many different approaches that I have no idea which one solved the problem.

    Now I have the same problem with a VPN loader program. I want this to run at startup or logon, before my email and browsers in my Startup group load. I can't even get it to start enough to ask for an admin pw before running unless I do it manually after logon. Then I get that prompt for an admin pw before the VPN program will run.

    I have "start at logon" checked within the program. I tried putting the program into my Startup group. I tried logging on as an admin and using Scheduler to start it at any logon. Nothing has gotten me out of the admin pw prompt. The publisher says it knows of no workaround.

    Anyone know how to do this? The program is PIA_manager from Private Internet Access, but I think the issue is more generalized than just this program.
      My Computer


  2. Posts : 71,977
    64-bit Windows 11 Pro for Workstations
       #2

    Hello Randy,

    By default, Windows will not run anything elevated at startup for security reasons.

    If you like as a workaround, you could use the tutorial below to create a task in Task Scheduler to run the program elevated. When you get to step 23, you would use the "run at startup as a task" link to create another task to run the elevated task at startup without getting a UAC prompt.

    Elevated Program Shortcut without UAC Prompt - Create

    Hope this helps, :)
    Shawn
      My Computer


  3. Posts : 31
    Windows 10 Pro 64 bit
    Thread Starter
       #3

    I don't think the linked tutorial will work for my issue. Right up front, it says:

    • This shortcut and task can only be created and work while logged in as an administrator account.
    • This shortcut will not work in a standard user account.


    There is something that is confusing me. The linked article, and one you wrote on Run at Startup, don't really distinguish between Startup and Logon. I have assumed that Startup meant when Windows 7 was booting up, and before the logon screen. If that were true, the second warning above would be irrelevant if you created a Run at Startup task. Windows wouldn't know which account your were going to logon to.
      My Computer


  4. Posts : 2,465
    Windows 7 Ultimate x64
       #4

    The tutorial may help, just forget about the shortcut part. Take a look at the "triggers" tab in the task scheduler. It indicates conditions for running the task automatically without user intervention. One possible option is at system startup, before any user has the chance to login, therefore, before running any start menu shortcuts.

    Another possibility is to setup that program to run as a service instead.
      My Computer


  5. Posts : 71,977
    64-bit Windows 11 Pro for Workstations
       #5

    Randy,

    That's true that you will not be able to use it in a standard user account, and only in an administrator account.

    If you like you could use the tutorial below to allow a standard user account to run an elevated program without being prompted by UAC. The only drawback is that it cannot be used to run at startup for a standard account. The standard account would have to manually run it at startup or when they like instead.

    Elevated Program Shortcut - Create for Standard User
    Last edited by Brink; 19 Feb 2013 at 11:21.
      My Computer


  6. Posts : 31
    Windows 10 Pro 64 bit
    Thread Starter
       #6

    Brink said:
    If you like you could use the tutorial below to allow a standard user account to run an elevated program without being prompted by UAC. The only drawback is that it cannot be used to run at startup for a standard account. The standard account would have to manually run it at startup or when they like instead.
    Good news, and better news. The tutorial worked as described. After I Restarted, I logged on as a user. Ran it once to enter the administrator password. After rebooting, I could just click on the new shortcut and it would run without reentering the password.

    Here's the better news. I copied the new desktop shortcut to my Startup folder. When I restarted my machine and logged on my user account, the VPN program started on its own, with no password required.

    PROBLEM SOLVED!

    One question - when I entered my admin password that one time, where did it get stored?

    Thank you very much.

    Randy
      My Computer


  7. Posts : 71,977
    64-bit Windows 11 Pro for Workstations
       #7

    Great news Randy. I wasn't sure if it would allow it to run at startup like that, but glad to hear it will.

    The password is stored encrypted in the registry somewhere.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

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