
Adding Conditions to Security Policy
The Microsoft .NET Framework provides two major ways for you to deploy policy:
Using a Windows Installer file allows more predictable policy evaluation because the entire policy level (typically Enterprise or Machine) is copied to the end user's computer; however, this can create conflicts if different groups within a company want to publish policy independently of each other, or if individuals need to make changes to their policy.
Using Caspol.exe to modify policy allows different people to update policy independently of each other, but any given policy change is not guaranteed to have the desired effect because of unknown interactions between different code groups. For example, if one department deploys a policy change granting full trust to a particular intranet site, that department expects all code coming from that site to be trusted. But if another department deploys policy with an Exclusive attribute denying access to that site, then no code will run. For more information about the Exclusive attribute, see Administration with Code Group Attributes and How to: Make Code Groups Exclusive or Level Final.
Administrators need to balance the predictability of Windows Installer files with the flexibility of Caspol.exe in deciding how to update policy.
Note that while it is also possible to write managed code to directly manipulate policy through the Microsoft .NET Framework APIs, it is hard to create policy correctly this way and the practice is highly discouraged.