Couple of comments ...
1. Certain keywords contained within a filename can trigger a UAC prompt
irrespective of other considerations eg install.exe, setup.exe, or perhaps
in your case update.exe. If your update file is similarly named and there's
no apparent need for elevation you could try renaming it.
2. I can't see any reason why things would work differently in a large main
app to a smaller app, other than a coding difference, but you can usually
force a UAC prompt, if required, by using a "runas" flag with ShellExecute
(one of the arguments to the method).
--
Jon
"kpg" <> wrote in message
news:Xns9B216F261E95ipostthereforeiam@207.46.248.1 6...
> Hi all,
>
> Trying to get my vb6 app to run on vista.
>
> The program has an option to get an update. When the user clicks the
> update button I shell to antoher program that downloads the update.
>
> Here's the problem:
>
> The main program runs without the UAC prompt for elevation, but the update
> program does get the propmt - no big deal, except when I try to shell to
> the update program from the main program it does not launch and the
> extended error message is: requested operation requires elevation.
>
> So I wrote a samll test program that all it does is shell to the update
> program. When I run the test app I get no UAC prompt, and when I shell
> from it I get the UAC prompt and the update program runs!
>
> So I have a few questions/issues:
>
> 1. Why does vista allow my main and shelltest program run without UAC
> prompting but my update program does propmt?
>
> What is is about some programs that vista think don't need to be elevated
> but other that it obviously think need to be elevated? How does it
> determine that?
>
> 2. Why would my testshell app be able to launch the update program but my
> main cannot? My main program is much larger than the testsehll, but
> functionally for the purpose of shelling to the update they are the same.
> shelling to update form main should cause vista to show the UAC prompt and
> allow the program to be run - but it does not, it just fails with the
> error
> elevation required.
>
> Normally I use createprocess to shell, but I also tried shellexecute and
> the native vb6 shell. All three work fine in my testshell app, but none
> work in main.
>
> Here's another twist: If is disable UAC everything works fine, main can
> shell to update. So I lnow this is a UAC issue.
>
> In summary - I don't mind UAC prompting when I try to shell to update, but
> form main the shell fails but in a samll test program it succeeds.
> Turning
> off UAC allows main to shell, Very strange.
>
>
>
|