Login Method

Action2 Example

AutoMate™ NT Service Edition Only

 

Encapsulates the AutoMate™ action in the “System” group, “Login.” The method attempts to set the security context of the currently running task to that of another user.

 

Declaration

function Login (varUsername As Variant,

varPassword As Variant,

varDomainName As Variant,

intNewDesktop As Integer,

intInteractive As Integer,

intLaunchExplorer As Integer,

intLockMouse As Integer,

intLockKeyboard As Integer) As Integer

 

Parameters

varUsername

 The name of the user the AutoMate™ task should act as.

 

varPassword

 The password of the user the AutoMate™ task should act as.

 

varDomainName

 The domain that varUsername is a part of.

 

intNewDesktop

 Set to “1” if AutoMate™ should login the user in a new interactive workspace and setup their default desktop. Set to “0” if no new interactive session is required.

 

intInteractive

 Specified whether or not the new login session should allow the user to interactively work with the desktop. If set to “0”, the session logins in the background, refusing user input and carrying out the task securely. Set to “1” if the user should access the new desktop.

 

intLaunchExplorer

 Set to “1” if explorer.exe should be run on the new interactive desktop This establishes a new desktop. Set to “0” if no desktop is required.

 

intLockMouse

 Set to “1” to stop the mouse from being accessed during the login session. Set to “0” to allow access to the mouse.

 

intLockKeyboard

 Set to “1” to lock the keyboard during the login session. Set to “0” to allow access to the keyboard.

 

Description

The AutoMate™ NT Service edition starts each individual task in the space of a specific user. Usually, this user is the one set by the Default Login, set in Preferences. Sometimes it is necessary to override the default user and have the task operate in the security context of another user, for example the administrator.

 

In these cases, use the Login method to change the security context of the task to that of a different user. AutoMate™ will log the user on in the background, and each subsequent step will be executed as if the new user were at the computer.

 

See the AutoMate™ Help File under “NT Service Edition Notes” for more information about user logins and security contexts.