Sign in to follow this  
Followers 0
cmtuggl

Vista UAC - Can you detect if program is run with elevated privilates (or not)?

1 post in this topic

OK so here's my problem...

If my program is run in Vista with UAC enabled the program itself works fine if elevated. However, my program tries to execute another program - which also gets prompted with UAC elevation. This would be fine in a regular user scenario, but most of the time my users will simply execute my program then leave the computer...which leaves the process stalled at the UAC prompt for the other program.

If my program is run in Vista with UAC NOT enabled, the code doesn't execute properly (please do not respond "fix this part").

What I want to know is: Is there a way to detect if MY program is being run with elevated privlages?

I know how to require admin credentials, I know how to detect if UAC is enabled, but this is the missing piece. If I can prompt the user during these conditions to stay at the screen, it would be a big help to the operational effeciency for this code and the process as a whole.

Share this post


Link to post
Share on other sites



Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0