paIsRunAsAdmin()
The function checks if the process of the project administration is running with administrative privileges.
Synopsis
bool paIsRunAsAdmin();
Parameters
Parameter | Description |
---|---|
- | - |
Return value
TRUE: Project administration is running with administrative privileges
FALSE: No administrative privileges are available.
Error
-
Description
To check if the necessary privileges for the project administration are available the function paIsRunAsAdmin() queries the current privileges.
The function only returns a the correct information regarding the available permissions when used on Windows. The function always returns FALSE when used on Linux.
The following example checks the available permissions and prints the results to the LogViewer.
main()
{
bool isAdmin;
isAdmin = paIsRunAsAdmin();
if(isAdmin)
{
DebugN("Permissions available");
}
else
{
DebugN("Permissions not available");
}
}
Assignment
Project administration functions
Availability
CTRL