Do you need to frequently run applications which require administrative permissions, but each time you run them, you have to go through a UAC (User Account Control) prompt? If that's the case, well... there are several solutions (some more complex than others) which allow you to run these programs without the UAC prompts and without turning off UAC. In this article we will demonstrate a solution that uses the Task Scheduler.
Step 1: Create a Task Which Runs the Program You Want
First of all, you need to open Task Scheduler. This, together with an overview of how it works, can be found in a previous tutorial called First Steps in Working With the Task Scheduler.
Next, you need to create a new task which simply starts the program you want to use without UAC prompts. Complete information about how to create tasks, can be found in our article called Advanced Users - Task Creation With Task Scheduler.
When you create this task, in the the General tab, type the name of the task (remember this name, you will need it later on) and check the box which says 'Run with highest privileges'. This sets the task to run with administrative permissions.
To make sure that you don't have any compatibility issues go to the 'Configure for' drop-down box, at the bottom of the Create Task window, and select the Windows® 7, Windows Server™ 2008 R2.
Go to the Actions tab, were you need to create the action that launches the program. Here the drill is simple: select the action 'Start a program', specify the path to the program that will be executed and click OK. For this article we took as an example the Command Prompt, as shown below.
Your last stop is at the Settings tab. Here you have to make sure that the 'Allow task to be run on demand' check box is selected. Also, make sure that when the task is already running, another instance won't be started, by selecting the 'Do not start a new instance' option, as shown in image below.
Click OK and you are done. You just created a task that launches the program you specified.
Now, to make sure that your task works, take it for a test. Go to the Task Scheduler Library, right-click on the task you just created and click Run.
Did it launch the program you specified? If it did, you are done. If it did not... well... start over. :)
In our case, the test ran without any problems and, as a result, the Command Prompt was launched with administrative permissions.
Step 2: Create a Shortcut to the Task
The second step in this procedure is to create a shortcut which launches the task you just created which, in turn, runs the program you selected without a UAC prompt showing up. Sounds complicated, I know. Fortunately it is not that hard. You'll see!
If you wish to learn or review how to create a shortcut, check out the steps from this article: How To Create Shortcuts.
An important difference when creating a shortcut towards a task vs. a normal shortcut is that you need to type schtasks /run /tn "Task Name" (Task Name needs to be replaced with the actual name of the task), in the 'Type the location of the item' field. In this command, the parameter /run simply runs a specified task while /tn allows you to type the name of the task you want to run.
Once the shortcut is created, if you click on it, it will run the task you created which, in turn, will launch the program you specified with administrative permissions but without the UAC prompt showing up.
NOTE: If you want to change the icon of a shortcut check out this article: How To Change the Icon of A Shortcut.
Now this wasn't that hard, was it? A bit time consuming but definitely worth the effort, especially if you are working often with applications requiring administrative permissions. To learn more about other cool things that can be done with the Task Scheduler, check out the articles recommended below.