SaveToFile(FileName: String);
FileName. The path to the security policy file to which the security policy will be saved (*.pppolicy).
The SaveToFile method saves the security policy into the file.
Sub main;
Var
MB: IMetabase;
MS: IMetabaseSecurity;
Sna: ISecuritySnapshot;
Log: ISecuritySnapshotLog;
sFile: String;
Begin
MB := MetabaseClass.Active;
MS := MB.Security;
Sna := MS.NewSnapshot;
sFile := "c:\test.pppolicy";
Sna.SaveToFile(sFile);
Log := Sna.Log;
While Not Log.Eof Do
Debug.WriteLine(Log.Message);
Log.Next;
End While;
End Sub main;
The security policy contour is saved into the file after executing this example.
See also: