Question

I realize I can use a manifest to make my app request administrator permissions, so that it can successfully create shared folders.

As alluded to here Windows 7 folder sharing API, I imagine there are more granular approaches.

Can I instead designate my application to request/require permission to share folders, and not elevate all the way to 'administrator'?

Thanks

Was it helpful?

Solution

There are no more granular solutions. It is easy to understand why once you know how UAC works.

It basically creates two access tokens during logon. It is as if two different users had logged on, one with, and the other without administrator rights. Whenever an application requests admin rights in its manifest Windows presents the well-known dialog. Once the user accepts the evelation request, Windows runs the new process with the unrestricted access token.

That is all there is to it. So you see, UAC only has two modes: with and without membership in Administrators.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top