Make shortcut always run as administrator(12 posts)
Aleeve, I'm guessing you mean the VBscript from this article:
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.
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.
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.
This topic has been closed to new replies. Please create a new topic instead.