Setup Factory 10

System.GetUserInfo

System.GetUserInfo

This is the first topic This is the last topic  

System.GetUserInfo

This is the first topic This is the last topic  

OverviewExamples

table System.GetUserInfo (

)

Example 1

user_info = System.GetUserInfo();

Gets the current user's information and stores it in the "user_info" table.

Example 2

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.

Example 3

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


Learn More: Indigo Rose Software - Setup Factory - Buy Now - Contact Us