K
kpg
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.
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.