views:

97

answers:

1

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 restricted 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.

+2  A: 

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

curtisk
Thanks Curtisk! Is there any way to find a list of all privileges available and all privileges my application uses, so that I can turn off the privilege I don't need?
Chad
see update in main answer.....good luck!
curtisk
Thanks...you got me 90% of the way there. See editing original post.
Chad