Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Vista Newsgroups > Vista General

Vista Tutorial - vbscript and UAC prompt

Reply
 
Old 03-01-2007   #1 (permalink)
dak
Guest


 
 

vbscript and UAC prompt

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?

My System SpecsSystem Spec
Old 03-01-2007   #2 (permalink)
Mark
Guest


 
 

Re: vbscript and UAC prompt

On 3/1/2007 10:45 AM, dak:
> 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.
My System SpecsSystem Spec
Old 03-01-2007   #3 (permalink)
Jon
Guest


 
 

Re: vbscript and UAC prompt

"dak" <dak@discussions.microsoft.com> wrote in message
news:A48EF80C-93C4-4005-A00B-B0B3E95FEC9A@microsoft.com...
> 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.

--
Jon

My System SpecsSystem Spec
Old 03-02-2007   #4 (permalink)
dak
Guest


 
 

Re: vbscript and UAC prompt

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.

"Jon" wrote:

> "dak" <dak@discussions.microsoft.com> wrote in message
> news:A48EF80C-93C4-4005-A00B-B0B3E95FEC9A@microsoft.com...
> > 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.
>
> --
> Jon
>
>

My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
cmd prompt General Discussion
Uac prompt General Discussion
How to do No hang up VBScript (nohup for VBScript) VB Script
DOS Prompt Here Vista General
Ah, the DOS Prompt Vista file management


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, 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 33 34 35 36 37 38 39 40 41 42 43 44 45 46