Vista UAC problem with WScript.Shell Run method
- From: <m.piceni@xxxxxxxxxxxxxxxx>
- Date: Thu, 4 Jan 2007 18:33:25 +0100
Hi,
I'm trying to make an HTA working on Vista. I was able to make it work
almost fine, but I have a problem running an external EXE file with the
WScript.Shell Run method. When trying to run the application I get the
Access Denied error, because of the UAC. I saw that setting the "Run this
program as an administrator" flag on the Compatibility tab of the EXE
properties, everything works fine (just asks user confirmation, but this is
acceptable). The question is: how can I set this flag programmatically ?
Alternatively I thought to use invokeverb to "Run as administrator", but the
system seems to ignore the invokeverb (while it correctly invoke the "Open"
verb). Is there a way to invoke the "Run as administrator" verb ?
Finally, when running an application, is there any way to know if the user
confirmed or denied it ?
Thanks for any help.
Massimo.
.
- Follow-Ups:
- RE: Vista UAC problem with WScript.Shell Run method
- From: Luke Zhang [MSFT]
- RE: Vista UAC problem with WScript.Shell Run method
- Prev by Date: Re: UPDATE: Logon Script Problem
- Next by Date: Re: UPDATE: Logon Script Problem
- Previous by thread: RE: Assigning drive letter
- Next by thread: RE: Vista UAC problem with WScript.Shell Run method
- Index(es):