Credentials validation uses built-in Windows capabilities and can fail only if the credentials are invalid on both the workstation and the domain.

Command Line Tool

Most features of LogonExpert are accessible from the command line. A special executable file (le.exe) located in the LogonExpert installation folder should be used for this purpose. After the program is installed, the le.exe file is available from any working directory, so there is need to use the full path to call it. The tool cannot be used on a system where LogonExpert is not installed.

The le.exe file needs to be run under an account with administrative privileges in case the Allow unprivileged users to configure LogonExpert check box on the Security tab is unchecked.

Additionally, le.exe can be used remotely via Telnet, SSH or PsExec.

The acceptable command line parameters are listed below.

Command line parameters for le.exe

Parameter Description
-lock Locks the computer no matter what user is logged on.
-logon [username password] [domain] Logs on a user whose credentials are stored in the LogonExpert settings or specified as the optional parameters. Also can be used for unlocking the computer. Fails to if the credentials cannot be validated by LogonExpert.
-logoff [username] Logs off a user whose credentials are stored in the LogonExpert settings or specified as the optional parameter. Performs no action if the user is not logged on (and/or another user is logged on).
-logoff * Logs off all currently logged on users
-setcredentials username [password] [domain] Overrides the credentials stored in the LogonExpert settings. Fails to if the credentials cannot be validated by LogonExpert.
-force Forces LogonExpert to use the credentials defined with -logon and -setcredentials even if they failed to be validated.
-enable Enables automatic logon on startup by checking the corresponding check box on the Credentials tab.
-disable Disables automatic logon on startup by checking the corresponding check box on the Credentials tab.
-t xx Defines a logon/logoff timeout (in seconds). Uses the default value of 120 seconds if the parameter is not set. Exit code 3 is returned if a logon/logoff cannot be performed by LogonExpert within the specified time.
-setparams 
[DelayLogon=X]
[DelayLogonValue=X]
[EnableScheduler=X]
[AllowUsersConfigure=X]
[AllowAutologonInSafeMode=X]
[KeepComputerLoggedOn=X]
[KeepComputerUnlocked=X]
[LockPCAfterLogon=X]
[DelayPCLock=X]
[DelayPCLockValue=X]
[CancelAutologonByShift=X]
[ShowLogo=X]
[BypassLegalNotice=X]
Changes the LogonExpert settings.
The following options can be set to either 1 (turn on), or 0 (turn off):
EnableScheduler Enables the built-in scheduler
AllowUsersConfigure Allows unprivileged users to configure LogonExpert
AllowAutologonInSafeMode Allows autologon when Windows loads in Safe Mode
KeepComputerLoggedOn Keeps the computer logged on
KeepComputerUnlocked Keeps the computer unlocked
LockPCAfterLogon Locks the computer after logon
CancelAutologonByShift Cancels autologon when SHIFT is pressed
ShowLogo Shows the LogonExpert logo
BypassLegalNotice Bypasses the legal notice during autologon
Example: 
le.exe -setparams ShowLogo=0
Hides the LogonExpert logo.

The following options can be either set to the required number of seconds (turn on), or 0 (turn off):

DelayPCLock Delays the post-logon lock for X seconds
DelayLogon Delays logon on startup for X seconds
Example: 
le.exe –setparams DelayPCLock=60
Enables a post-logon lock delay and sets it to 1 minute.
Le.exe -setparams DelayLogon=0
Disables the pre-logon delay on startup
-? Lists the above parameters.

Return codes for le.exe

The le.exe tool may return one of the following exit codes.

Return Code Description
0 The command has been executed successfully.
1 Error: The required files have not been found. Please reinstall LogonExpert.
2 Error: The logon credentials cannot be validated.
3 Error: The user cannot be logged on/logged off within the allotted time.
4 Error: The logon cannot be performed as another user is already logged on.
5 Error: The computer cannot be locked as no user is logged on.
6 Error: The LogonExpert service is not installed or running. LogonExpert might not have been installed properly.
7 Error: This action cannot be performed due to the license being invalid. Please launch LogonExpert Administrator for additional information.
8 Error: You do not have appropriate rights to run LogonExpert. Please launch LogonExpert Administrator and configure the rights on the Security tab.
9 Error: The logon has been interrupted with the Shift key.
11 Error: The computer is already locked.
12 Error: The computer is already unlocked.
13 Error: The logon has been interrupted.
14 Error: No -setparams parameters specified.
15 Error: Unknown -setparams parameters.
16 Error: The KeepComputerUnlocked and LockPCAfterLogon parameters cannot share the same value.
Notes