LaPhi
LaPhi

Reputation: 5887

Windows UAC, Admin prompt, Run Application with current user rights

I want to use a Application on Windows 7 without Admin priviliges. (Sure for the install process i used Admin priviliges)

Now i had following problem: When i want to start the application the UAC popup ask for an Admin Account to run the program. But the User had no Admin account and can only click "No" so the Application is closed.

Is it possible to use this application with the rights from the current user and deactivate the UAC prompt?

On Win XP, only popup a error message that the application had no admin priviliges. But by selecting "Ok" the application is starting and working.

Upvotes: 0

Views: 1558

Answers (1)

Cody Gray
Cody Gray

Reputation: 244672

You need to create and embed a manifest into your application. This tells the operating system that your program was written to be compatible with the UAC built into Windows Vista (and later), and therefore does not need to be run as Administrator. Set the requested execution level to asInvoker.

See this article on MSDN for more details.

There's also a helpful, though somewhat more general, article that appeared in the MSDN Magazine regarding UAC: Teach Your Apps To Play Nicely With Windows Vista User Account Control

Upvotes: 1

Related Questions