Saves the modified security policy state.
[Visual Basic] Public Shared Sub SavePolicy() [C#] public static void SavePolicy(); [C++] public: static void SavePolicy(); [JScript] public static function SavePolicy();
|SecurityException||The code that calls this method does not have SecurityPermissionFlag.ControlPolicy.|
This method saves the policy as exposed by PolicyHierarchy, PolicyLevel, and other classes that represent configuration of the security policy. Unless this method is called, changes made to the policy objects will not be saved and will not affect subsequent application runs.
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family
.NET Framework Security:
- SecurityPermission for the ability to modify policy. Associated enumeration: SecurityPermissionFlag.ControlPolicy