vbscript and UAC prompt

G

Guest

Is there any way to force from inside a VBscript the UAC prompt?

I have several vbscripts that run fine when launched from the elevated
command prompt. But when simply double-clickd they run, but of course at
user-level and therefore do not really work. Can the UAC prompt be forced
from a vbscript?
 
M

Mark

Is there any way to force from inside a VBscript the UAC prompt?

I have several vbscripts that run fine when launched from the elevated
command prompt. But when simply double-clickd they run, but of course at
user-level and therefore do not really work. Can the UAC prompt be forced
from a vbscript?

I don't have an answer for your question, however, this brings up a good
issue with the UAC.

Based on what is in Windows Vista's Help and Support file, the VBScript
should bring up the UAC prompt if necessary:

Excerpt from the Vista Help and Support:

User Account Control Overview

User Account Control (UAC) is a new set of infrastructure
technologies in this version of Windows that helps prevent
malicious programs, sometimes called "malware," from damaging
a system, while also helping organizations to deploy a better-managed
desktop.

With UAC, applications and tasks always run in the security context
of a non-administrator account, unless an administrator specifically
authorizes administrator-level access to the system. UAC stops the
automatic installation of unauthorized applications, and prevents
inadvertent changes to system settings.
 
J

Jon

dak said:
Is there any way to force from inside a VBscript the UAC prompt?

I have several vbscripts that run fine when launched from the elevated
command prompt. But when simply double-clickd they run, but of course at
user-level and therefore do not really work. Can the UAC prompt be forced
from a vbscript?


You can create a shortcut to 'wscript.exe' passing the path to your script
as argument. Then set the shortcut to run as an administrator via
right-click > properties > advanced...

Not ideal, since if you change the location of the script, then the shortcut
fails - but better than starting up an admin command prompt each time.
 
G

Guest

That would be OK if I were the person running these scripts, but I am
designing script to be run by other users on different computers. So still I
ask, can I force the UAC prompt from within a VBscript.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top