Function to check the existence of a specified users group.
function mIsUsersGroupExists(sGroupName: string): boolean;
Parameter |
Type |
Value |
---|---|---|
sGroupName |
string |
users group name. The letter case is important. |
true — group exists, false — group with such name does not exist on the server.
var
bFlag: boolean;
s: string;
begin
bFlag := mIsUsersGroupExists('Andministrators');
if bFlag then s := 'already exists'
else s := 'doesn''t exist';
mLogScript('Group "Administrators" ' + s, '');
end.
[18:01:25] (Log "mIsUsersGroupExists"): Group "Administrators" doesn't exist
[18:01:25] (Run "mIsUsersGroupExists"): Script operation time: 6 ms
[18:01:25] (Run "mIsUsersGroupExists"): Script done successfully.