View Single Post
  #3 (permalink)  
Old 03-01-2007
Jon
 

Posts: n/a
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

Reply With Quote