Trick: Create elevated shortcut to skip UAC prompt in Windows 10

source: https://winaero.com/blog/create-elevated-shortcut-to-skip-uac-prompt-in-windows-10/

Create elevated shortcut to skip UAC prompt in Windows 10

User Account Control, or just UAC is a part of the Windows security system which prevents apps from making unwanted changes on your PC. When some software tries to change system-related parts of the Registry or the file system, Windows 10 shows an UAC confirmation dialog, where the user should confirm if he really wants to make those changes. Usually, the apps that require elevation are related to the management of Windows or your computer in general. A good example would be the Registry Editor app. If the application you are using frequently requires a UAC request every time you start it, confirming the prompt on every launch can get a bit annoying. In this article, we will see how to create a shortcut to run apps elevated without a UAC prompt in Windows 10.

To skip the UAC prompt and start an app elevated, you need to create a special task in the Windows Task Scheduler which allows executing apps with admin privileges. The Task Scheduler has a graphical MMC version (taskschd.msc) which we will use.

In the tutorial below, I will show you how to make Regedit run elevated without a UAC prompt showing up. You can use these steps for any app you want to launch elevated.

Creating a shortcut to run apps elevated without a UAC prompt in Windows 10

  1. Open Control Panel. (note Johan: you can do this in Autohotkey by running – without quotes: “Run ::{21ec2020-3aea-1069-a2dd-08002b30309d}”)
  2. Go to Control Panel \ System and Security \ Administrative Tools.
  3. In the newly opened window, double-click the shortcut “Task Scheduler”: Windows 10 administrative tools
  4. In the left pane, click the item “Task Scheduler Library”: Windows 10 Task Scheduler Library
  5. In the right pane, click on the link “Create task”: Windows 10 Create Task link
  6. A new window titled “Create Task” will be opened. On the “General” tab, specify the name of the task. Pick an easily recognizable name like “App name – elevated”. In my case, I will use “Regedit – elevated”.
    You can also fill in the description if you want.
    Windows 10 Create Task window name task
  7. Now tick the checkbox named “Run with highest privileges”: Windows 10 Create Task window run elevated checkbox
  8. Switch to the “Actions” tab. There, click the “New…” button:
    Windows 10 Create Task window Actions tab Windows 10 Create Task window Actions tab new button
  9. The “New Action” window will be opened. There, you can specify the path to the executable (.exe file) of the app you are trying to run elevated without a UAC prompt. In my case, I will enter
    c:\windows\regedit.exe

    See the following screenshot:
    Windows 10 Create Task window new action dialog
    Note: by default, apps started by tasks like the one we just created will start with no focus. Their windows might appear in background.
    If you are not happy with this issue, then use the following trick:
    – In “Program/Script”, enter the following:

    C:\windows\system32\cmd.exe

    In “Add agruments”, type the following:

    /c start "" program.exe [program arguments if required]

    In my example with Regedit it will look as follows:
    Windows 10 Create Task window new action dialog cmd

  10. Click “OK” in the “New Action” dialog to apply your settings and close it.
  11. Switch to the “Conditions” tab:
    Windows 10 Create Task window Conditions tab
    Untick options
    – Stop if the computer switches to battery power
    – Start the task only if the computer is on AC power
    See the following screenshot:
    Windows 10 Create Task window Conditions unticked
  12. Now, click “OK” to close the “Create Task” window. Now that you’ve created the task, it’s a good time to test it. Right click it and select “Run” from the context menu. It should open the app you specified:
    Windows 10 Task Scheduler run context menu Windows 10 task started
  13. Now, to create a new shortcut to launch the app from your Desktop.
    Right click the empty space on your Desktop and select New -> Shortcut:
    Windows 10 desktop new shortcut
  14. In the location of the item, enter the following:
    schtasks /run /tn "your task name"

    In my case, it should be the following command:

    schtasks /run /tn "Regedit - elevated"

    Windows 10 schtasks shortcut target

  15. Name your shortcut however you like: Windows 10 schtasks shortcut name
  16. Finally, pick an appropriate icon for the shortcut you have created and you are done:
    Windows 10 schtasks shortcut icon

Watch the following video to see all steps in action:

That’s it. As you can see, creating elevated shortcuts involves a lot of actions and a notable amount of time.

Loading