OverviewExamples
table System.GetUserInfo ( |
) |
user_info = System.GetUserInfo();
Gets the current user's information and stores it in the "user_info" table.
user_info = System.GetUserInfo();
if (not user_info.IsAdmin) then
Dialog.Message("Warning", "You are not logged in with the appropriate permissions.");
end
Checks to see if the current user is logged in with administrator permissions and if they are not, displays a dialog box informing them.
In this example, the registered user and organization could be accessed by referencing user_info.RegOwner and user_info.RegOrganization.
user_info = System.GetUserInfo();
if (user_info.IsAdmin or user_info.IsVistaAdminLimitedToken) then
Shell.Execute(_TempFolder.."\\MyProg.exe", "open", "", "", SW_SHOWNORMAL);
else
Dialog.Message("Warning", "You are not logged in with the appropriate permissions.");
end
Checks to see if the current user is a member of the Administrators group who is either running with full privileges, or can be elevated to these privileges on Vista or later in order to run "MyProg.exe." If they are not, a dialog box is shown informing them.
See also: Related Actions