ApplicationCriteriaList

Gets or sets the list of properties that are used to identify a specific Windows application.

Syntax

In .NET:

IEnumerable<IWindowsApplicationCriteria> ApplicationCriteriaList {get; set;}

In VBScript:

object[] ApplicationCriteriaList {get; set;}

Property value

The complete match criteria defined to identify a specific Windows application.

Example

The following code sample illustrates using ApplicationCriteriaList in a script:

// Create a new Windows application right with some basic properties.
$objWindowsApplication = $objZone.CreateWindowsApplication();
    $objWindowsApplication.Name = $strWindowsApplication;
    $objWindowsApplication.RunAsType = $runAsType;
    $objWindowsApplication.RunAsString = $strDnList;
    $objWindowsApplication.RequirePassword = $requirePassword;
    $objWindowsApplication.Description = "optional description";
    $objWindowsApplication.Priority = 0;
// Specify the criteria used to identify the Windows application.
    $listType = ("System.Collections.Generic.List``1" -as "Type");
    $listType = $listType.MakeGenericType( @( ("Centrify.DirectControl.API.IWindowsApplicationCriteria" -as "Type")));
    $criteriaList = [Activator]::CreateInstance($listType);
    $objApplicationCriteria = $objWindowsApplication.CreateApplicationCriteria();
    $objApplicationCriteria.FileType = [Centrify.DirectControl.API.WindowsFileType]::EXE;
    $objApplicationCriteria.FileName = "calc.exe";
    $objApplicationCriteria.Path = "SYSTEMPATH";
    $objApplicationCriteria.FileDescription = "Windows Calculator";
    $objApplicationCriteria.FileDescriptionMatchOption = [Centrify.DirectControl.API.StringMatchOption]::ExactMatch;
$objApplicationCriteria.FileVersion = "6.1";
    $objApplicationCriteria.FileVersionMatchOption = [Centrify.DirectControl.API.VersionMatchOption]::LaterThanOrEqualTo;
    $objApplicationCriteria.Description = "Match criteria for Windows Calc";
$objWindowsApplication.ApplicationCriteriaList = $criteriaList;
    $objWindowsApplication.Commit();
    Write-Host("WindowsApplication {0} has been added to zone {1} successfully." -f $strWindowsApplication, $strZone);
    exit 0;
}