SEARCH

The How-To Geek Forums Have Migrated to Discourse

How-To Geek Forums / Windows Vista

Make shortcut always run as administrator

(12 posts)
  • Started 6 years ago by Aleeve
  • Latest reply from jd2066
  • Topic Viewed 94139 times

Aleeve
Posts: 2818

Is there anyway to do this - i have made a shortcut on desktop for the cheat way to make a system restore point quickly that geek said about a while back, and it asks for administrator every time, which is really annoying
anyway around this? (just for the one shortcut)

Posted 6 years ago
Top
 
whs
Posts: 17584

Right click on the shortcut > Properties > Advanced > check the box "Always run as administrator > OK > Apply > OK

Posted 6 years ago
Top
 
Aleeve
Posts: 2818

it's greyed out?

Posted 6 years ago
Top
 
whs
Posts: 17584

Two possibilities: a)this program you cannot run in admin mode, b) you are not on the "shortcut" button. Try the procedure on Command Prompt (in Accessories) once - just to see how it works.

Posted 6 years ago
Top
 
Aleeve
Posts: 2818

do what on command prompt?

Posted 6 years ago
Top
 
whs
Posts: 17584

Do what's described in my first post - except don't start with a shortcut but with the Command Prompt program in Accessories. It is just to demonstrate how it works.

Posted 6 years ago
Top
 
ScottW
Posts: 6609

Aleeve, I'm guessing you mean the VBscript from this article:
http://www.howtogeek.com/howto.....ows-vista/

I just tried making a desktop shortcut to a different VBscript and I get the same thing. "Run as admin" is greyed out in Advanced properties for the shortcut. I'm sure it's because it's a VBscript, I just don't know how to get around it...yet.

Posted 6 years ago
Top
 
whs
Posts: 17584

ScottW, Good guess. I did not even remember that one.

Posted 6 years ago
Top
 
ScottW
Posts: 6609

Aleeve, I see two possibilities. Either modify the script to run with admin permissions (hard) or launch the script as an admin with your userid using "runas" (not as hard). Here's a primer on runas from TechNet:
http://technet2.microsoft.com/.....x?mfr=true

Posted 6 years ago
Top
 
jd2066
Posts: 3814

Just to check as I'm a bit confused on what you are asking, do you want a program that doesn't ask for Administrator Access to always ask for it or do you want to bypass the "User Account Control" prompt that appears when the program asks for Administrator Access?

Posted 6 years ago
Top
 
ScottW
Posts: 6609

Aleeve, I was wrong about runas. It seems that a VBscript (.vbs) file is not considered an executable, so it gave me an error message. But, I found something that does work.

Create a shortcut on your desktop to %SYSTEMROOT%\system32\cscript.exe and add your .vbs file to the command line in the shortcut. So, for my test, the Target field in the shortcut is:
C:\Windows\System32\cscript.exe "E:\Temp\Silent Runners.vbs"

This shortcut will now execute the script and it can be set, in Advanced properties, to Run as Administrator. Of course, as jd reminds us, you still get a UAC prompt. Hope that helps you.

Posted 6 years ago
Top
 
jd2066
Posts: 3814

I just looked at the script on http://www.howtogeek.com/howto.....ows-vista/
It appears it is already designed to launch itself as Administrator so I think Aleeve must be asked about bypassing the UAC prompt.
In which case check out http://huddledmasses.org/vista.....prompting/
It lists how to use the Task Sceduler to launch tasks elevated without the UAC prompt.
I also made an article on that at http://www.techoddity.com/howt.....ac-prompt/
Note: For a script like the one on the restore point article the program to run will be wscript.exe and the "add arguments" field will have the path to the script.

Posted 6 years ago
Top
 



Topic Closed

This topic has been closed to new replies.