Windows 7 Forums


Windows 7: Elevated Program Shortcut without UAC Prompt - Create


Elevated Program Shortcut without UAC Prompt - Create

How to Create an Elevated Program Shortcut without a UAC Prompt
Published 03 Jun 2009
Published by

Featured Tutorial

User Profile - Customize During Installation
User Profile - Customize During Installation

How to Customize Default User Profile in Audit Mode

Microsoft Account Display Name - Change
Microsoft Account Display Name - Change

How to Change your Microsoft Account Display Name

Chrome GPU Hardware Acceleration - Turn On or Off
Chrome GPU Hardware Acceleration - Turn On or Off

How to Turn GPU "Hardware Acceleration" On or Off in Chrome

Clean Reinstall - Factory OEM Windows 7
Clean Reinstall - Factory OEM Windows 7

How to Clean Reinstall a Factory OEM Windows 7

Microsoft Account Primary Alias Email Address - Change
Microsoft Account Primary Alias Email Address - Change

How to Change your Microsoft Account Primary Alias Email Address

Online Scanners - Scan Suspicious Files on your PC
Online Scanners - Scan Suspicious Files on your PC

How to Scan Suspicious Files using Online Scanners
How to Create an Elevated Program Shortcut without a UAC Prompt

information   Information
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.

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

Note   Note
Special thanks to OEM for pointing this out, and the previous Vista version by DMEX.

You can run at startup as a task, Pin to Start Menu, Pin to Taskbar, assign a keyboard shortcut to the shortcut created below, or move to where you like for easy use.

warning   Warning
  • 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.




Here's How:
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. While having Task Scheduler Library selected in the left pane, click on Create task in the far right pane. (see screenshot below)
Elevated Program Shortcut without UAC Prompt - Create-step1.jpg
3. Under the General tab, type in the "Name" of the program you want to create this shortcut for. (see screenshot below)
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 and 14 below.
Elevated Program Shortcut without UAC Prompt - Create-step2.jpg
4. Check the Run with highest privileges box. (See screenshot below)
Elevated Program Shortcut without UAC Prompt - Create-step3.jpg
5. Click on the Configure for drop down box to open it, and select Windows® 7, Windows Server™ 2008 R2. (see screenshot above and below)
NOTE: This is like compatibility mode. If the program does not support running in Windows 7 normally, then you can select the OS that is does support running in instead to have it run in compatibility mode as if it was running in that OS instead of Windows 7.
Elevated Program Shortcut without UAC Prompt - Create-drop_down_box.jpg
6. Click on the Actions tab, then on the New button. (see screenshot below)
Elevated Program Shortcut without UAC Prompt - Create-step4.jpg
7. In the Program/script: box in the Actions tab, copy and paste the path below. (see screenshot below step 9)
NOTE: Thank you to chillz for the updated steps 7 and 8.
%windir%\System32\cmd.exe
8. In the Add arguments (optional): box in the Actions tab, type in the argument below. (see screenshot below step 9)

NOTE: Substitute Task Name in the argument below with the name you entered in step 3 (ex: CCleaner) within quotes, and substitute Full Path of Program in the argument below with the actual full path of the program's .exe file within quote.
/c start "Task Name" "Full Path of Program"


For example:

Code:
/c start "CCleaner" "C:\Program Files\CCleaner\CCleaner64.exe"
9. Click on OK. (see screenshot below)
Elevated Program Shortcut without UAC Prompt - Create-step7.jpg
10. Click on the Conditions tab, and uncheck the Stop if the computer switches to battery power box first, then uncheck the Start the task only if the computer is on AC power box. (see screenshots below)
NOTE: This step is mostly for laptops, so that you will be able to run the program when the laptop is running on battery power.
Elevated Program Shortcut without UAC Prompt - Create-step8.jpgElevated Program Shortcut without UAC Prompt - Create-conditions.jpg
11. Click on OK. (See screenshots above)

12. You will now see your new task created with the name (ex: CCleaner) you gave it in step 3. Close Task Scheduler. (see screenshot below)
Elevated Program Shortcut without UAC Prompt - Create-step9.jpg
13. Right click on a empty area of the desktop, then click on New and Shortcut.

14. Type in the target below for the location field, then click on the Next button. (see screenshot below)
NOTE: Subsitute task-name in the target with the name (ex: CCleaner) within quotes that you used in step 3.
schtasks /run /tn "task-name"

For example: For my task name CCleaner I used from step 3, I would type:
schtasks /run /tn "CCleaner"
Elevated Program Shortcut without UAC Prompt - Create-step10.jpg
15. Type in a name you want for the shortcut (ex: CCleaner), then click on the Finish button. (see screenshot below)
Elevated Program Shortcut without UAC Prompt - Create-step11.jpg
16. Right click on the new shortcut (ex: CCleaner) on the desktop, then click on Properties.

17. Click on the Shortcut tab and on the Change Icon button. (see screenshot below)
Elevated Program Shortcut without UAC Prompt - Create-step12.jpg
18. Click on OK. (see screenshot below)
Elevated Program Shortcut without UAC Prompt - Create-step13.jpg
19. Click on the Browse button. (see screenshot below)
Elevated Program Shortcut without UAC Prompt - Create-step14.jpg
20. Navigate to the .exe file of the program that you have created this shortcut with, then select it and click on Open. (see screenshot below)
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.
Elevated Program Shortcut without UAC Prompt - Create-step15.jpg
21. Select the icon you want for the shortcut, then click on OK. (see screenshot below)
Elevated Program Shortcut without UAC Prompt - Create-step16.jpg
22. Click on OK. (see screenshot below)
Elevated Program Shortcut without UAC Prompt - Create-step17.jpg
23. You can now run at startup as a task, Pin to Start Menu, Pin to Taskbar, assign a keyboard shortcut to the shortcut, or move to where you like for easy use.

Note   Note
If you would like to stop the quick flashing CMD pop-up when using the shortcut, then you can do this below to do so.
  • Right click on the shortcut and click on Properties.
  • Click on the Shortcut tab.
  • Select Minimized in the drop down menu to the left of Run, and click OK.

24. 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.

Tip   Tip
To Undo and Remove this Task:
  • While having Task Scheduler Library selected in the left pane, right click on the task in the right pane that you created in step 12, then click on Delete and Yes to approve.
  • Delete the shortcut.

That's it,
Shawn




Related Tutorials



Need more help? Try searching our extensive help and support site.
Loading
04 Jun 2009   #1
OEM

OS3.5
 
 

As always, very well done Shawn, tutorial is easy to read and understand.

This makes working with programs requiring a uac prompt that you trust a pleasure to run again, while keeping the security offered by the uac on and intact.

Note: Also works on Vista.

Thanks Shawn for this and All your contributions here on the greatest forum for Windows Windows 7.

Added:

Have the program load on start minimized:

To do this, you'll need to create a very simple .bat file. To start, Open your favorite text editor like notepad. Enter the following:

Code:
@echo off
start /MIN "" "C:\Program Files\CCleaner\CCleaner.exe"
The above is an example for cCleaner. For other programs, Simply enter the path to your program in quotes. Notice the 2 quotation marks placed together, anything you wish can be entered between them, but they must be there. See example:

Code:
@echo off
start /MIN "cCleaner" "C:\Program Files\CCleaner\CCleaner.exe"
Now you need to save this as a bat file. You do this by clicking file, then "save as" and in the save as box, there is a drop down for "save as type", choose "ALL TYPES" and name it something like "cCleaner.bat" to a location like "C:\MyBatFiles". You need to save the file with the ".bat" at the end. Thats how your basic notepad becomes a bat file. I recommend saving it to the c:\ root because it may need access to the file before you log in and if your not logged in yet the program might not load. So create a folder directly in C:\ drive and create a folder like the above example "MyBatFiles".

Example of "save as" above path:

C:\MyBatFiles\cCleaner.bat

Next you need to change the task scheduler for the program, so open it by typing task scheduler in start search and select it. If your tasks are not shown, Click on the Library folder near the upper left, then double click on the task you want to have open minimized on start up. Click on the "Actions" tab and highlight the current path and click "edit". In the opened edit window, you need to now browse to the newly created .bat file you just created. Once done click "OK".

Next, click on the "Triggers" tab. Click new and choose the option that best works for you from the drop down "Begin the task". For example "At startup". Click OK, then click OK to close the task editor. Thats it, your UAC program will not require your input, and will start automatically minimized for you.

Tip   Tip
For testing, in the triggers tab, "Begin the task" drop down, choose "On Workstation Lock". This way to test it, you don't have to restart the PC, just select "Lock" from the start menu. Once you log back on, you should see the program loaded and minimized. If so, you then can go back and choose at "At startup" in the task scheduler "triggers" tab, begin the task drop down.


Enjoy your program loading on startup, minimized, without UAC prompt input!


Last edited by OEM; 22 Jul 2010 at 07:35 PM..
My System SpecsSystem Spec

04 Jun 2009   #2
Brink

64-bit Windows 7 Ultimate SP1 & Windows 8 Enterprise
Texas
 
 

You're welcome OEM.

Thank you,
Shawn
My System SpecsSystem Spec
08 Jun 2009   #3
Axematic

Windows 7 Ultimate x86 build 7100
Planet-Earth
 
 

It doesn't works for me! I tryed everything but it was worthless.
Im running windows 7 RC.
My System SpecsSystem Spec
.


08 Jun 2009   #4
Brink

64-bit Windows 7 Ultimate SP1 & Windows 8 Enterprise
Texas
 
 

Hello Axematic,

What program are you trying this with, and did you select the correct .exe file?
My System SpecsSystem Spec
08 Jun 2009   #5
Axematic

Windows 7 Ultimate x86 build 7100
Planet-Earth
 
 

Hello Brink!
Im trying this for CCleaner. I browsed to .exe file and added a task to task scheduler. Even i am able to start it directly from scheduler(right click and run) but shortcut on my desktop doesn't starts a CCleaner. Maybe im doing something wrong?
I used this as shortcut target: schtasks /run /tn CCleaner
My System SpecsSystem Spec
08 Jun 2009   #6
Brink

64-bit Windows 7 Ultimate SP1 & Windows 8 Enterprise
Texas
 
 

Are you doing this in an administrator account?

You might delete this to undo it, then start over. Double check through each step carefully. You may have just made a simple mistake somewhere.

Please let us know how it went.

Last edited by Brink; 08 Jun 2009 at 07:45 AM..
My System SpecsSystem Spec
09 Jun 2009   #7
Brink

64-bit Windows 7 Ultimate SP1 & Windows 8 Enterprise
Texas
 
 

Hello Axematic,

I'm just checking in to see if you were able to get to work for you.
My System SpecsSystem Spec
09 Jun 2009   #8
Axematic

Windows 7 Ultimate x86 build 7100
Planet-Earth
 
 

Success Brink!!!
It works perfectly now! But i didn't find my mistake. I tryed all steps again 100% the same as above, and it worked. Cmd pop-ups and scheduled program runs.
And yes, im doing this as administrator!
And finally thanks! i hate UAC sometimes, but i dnt want to turn it off!
Sorry if my english was bad, it's foreign language for me.
My System SpecsSystem Spec
09 Jun 2009   #9
Brink

64-bit Windows 7 Ultimate SP1 & Windows 8 Enterprise
Texas
 
 

Axematic, I'm happy to hear that you got it working. Thank you for posting back.
My System SpecsSystem Spec
Comment

 Elevated Program Shortcut without UAC Prompt - Create problems?



Tutorial Tools



Similar help and support threads for: Elevated Program Shortcut without UAC Prompt - Create
Windows 7 Tutorial Category
Elevated Program Shortcut - Create for Standard User Tutorials
Elevated Command Prompt Shortcut Tutorials
How do I create a desktop shortcut to a program? General Discussion
Task Manager - Create Elevated Shortcut Tutorials
Solved Question on "How to Create a Elevated Program Shortcut ..." System Security


All times are GMT -5. The time now is 05:27 PM.


Seven Forums Android App Seven Forums IOS App Follow us on Facebook

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
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32