Elevated Program Shortcut without UAC Prompt

From IT Wiki
Jump to: navigation, search

This will show you how to create a elevated "Run as administrator" shortcut of any installed program in Windows using Task Scheduler so that it will not give you a UAC prompt for permission when you start it while still having UAC turned on.[1]

In the tutorial, you will first create a new task, then a new shortcut to run the task. Afterwords, how to change the icon of the shortcut.

Warning: This shortcut and task can only be created in a administrator account.


1. Open the Start Menu, then type taskschd.msc in the search line and press enter.

NOTE: This will open Task Scheduler. This file is located at: C:\Windows\system32\taskschd.msc.

2. In the far right pane, click on Create task.

3. Under the General tab, type in the "Name" of the program you want to create this shortcut for.

NOTE: This will be the name of the task. As an example, I will use CCleaner for that program. Make note of this name, you will need it later in step 12 below.

4. Check the Run with highest privileges box.

5. Click on the Actions tab, then on the New button.

6. Under "Action", select Start a program and click on the Browse button.

7. Navigate to the .exe file of the program that you want to create this shortcut for, then select it and click on Open.

8. In the "Start in: (Optional)" box enter the folder that the .exe file is in.

NOTE: This is necessary if the program creates any configuration files or looks for any files to be in the folder. Otherwise it will create them in your \Windows\System32 or \Windows\SysWOW64 folder or possibly fail to work.

9. Click on OK.

10. Click on OK.

11. You will now see your new task created with the name (ex: CCleaner) you gave it in step 3. Close Task Scheduler.

12. Right click on a empty area of the desktop, then click on New and Shortcut.

13. Type in schtasks /run /tn task-name for the location, then click on the Next button.


Tip:

Substitute task-name with the name that you used in step 3 and see in step 10 (ex: CCleaner).

For a Name without Spaces - For example, type:

schtasks /run /tn CCleaner

For a Name with Spaces - You will need to have quotes around the name if it has spaces. For example, type:

schtasks /run /tn "Cleaner Program"

14. Type in a name you want for the shortcut (ex: CCleaner), then click on the Finish button.

15. Right click on the new shortcut (ex: CCleaner) on the desktop, then click on Properties.

16. Click on the Shortcut tab and on the Change Icon button.

17. Click on OK.

18. Click on the Browse button.

19. Navigate to the .exe file of the program that you have created this shortcut with, then select it and click on Open.

NOTE: If you have a icon of your own that you would prefer to use instead, then navigate to where you have that icon saved at instead.

20. Select the icon you want for the shortcut, then click on OK.

21. Click on OK.

22. Move the shortcut to where you like for easy use.

23. When you run this new elevated shortcut, you will now no longer have to click on YES to approve the UAC prompt to allow the program run as administrator.


To Undo This:

  • Right click on the task in step 11, then click on Delete and Yes to approve.
  • Delete shortcut.