.NET - Lower Application Privileges
I would like to know how to programmatically lower my application's privileges. So, let's say someone with admin privileges runs my program, I would like my program to still run under a normal user's environment or with less privileges that I don't need. Also, could you explain what is restr开发者_如何学JAVAicted in the lower trust environment?
Edit: Curtisk suggested the permview.exe tool to view an application's permissions, which lead me in the right direction to the newer permcalc.exe tool - http://msdn.microsoft.com/en-us/library/ms165077(VS.80).aspx. Thanks again.
The RequestMinimum Flag may be close to what you need, although it is zone/PermissionSet based, more details in the linked MSDN How-to.
The idea is it will run the application with the least set of privileges to function, regardless of who calls it...
Follow up on question in comments below: check out the Permissions View Tool
精彩评论