Core Function IsAdmin

From Sputnik Wiki
Jump to: navigation, search
IsAdmin( )

Contents

Description

Check if the script is running in admin mode or not (Run as administrator).

Parameters

None.

Return Value

Success: Returns 1.

Failure: Returns 0.

Remarks

None.

Example

Check if the script is running in admin mode

if(isAdmin())
{
	println("Running in Admin mode");
}
else
{
	println("NOT running in Admin mode");
}

This will terminate the script if its not running in admin mode

if(!isAdmin())
{
	MsgBox("Must be running in Admin mode");
	Exit();
}
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox