System package guide
Read a process environment value or request a local Windows session and power change.
Version 2.17.1. Installed versions can differ. Examples are illustrative and not tested.
Prerequisites
Install the package on the Device. Lock, Logoff, Restart and Shutdown act on the current computer and Windows session. Save all work first. Restart, Shutdown and Logoff need the Windows right to shut down the computer; without it they fail.
These actions do not wait and cannot be cancelled or scheduled. Put them last in the automation, and test them on a test Device. Lock needs a signed-in desktop session. Windows can refuse a request; the action then fails.
Shared fields
Logoff, Restart and Shutdown use this field.
| Input | Editor field | Type; default; requirement | Use |
|---|---|---|---|
force | Force applications to close without saving | Booleandefault falseoptional | false asks applications to close normally; an application can refuse. true closes them by force and can lose unsaved data. It does not give missing Windows rights. |
Actions
Get environment variable (systemInformation)
Read one environment variable of the current process, such as SystemRoot. Nothing changes.
Inputs
| Input | Editor field | Type; default; requirement | Use |
|---|---|---|---|
variable | Source | Namedefault BY_optional | BY_ reads system; BY_ reads system. The other field is ignored. |
system | Environment variable list | Stringdefault emptyrequired in stated branch | For BY_: a name that is not empty, such as System; outer spaces are removed. An empty name fails. |
system | Variable | Stringdefault emptyrequired in stated branch | For BY_: a name such as System, or a String variable that holds it. Do not add % marks. |
Outputs
| Output | Type | Meaning |
|---|---|---|
result | String | The value, or empty if not set. |
Example
Set variableOption=BY_TEXT and systemNameByText=SystemRoot. Bind result to String variable windowsFolder.
Expected result
windowsFolder is usually C:\Windows. The value depends on the Device.
Lock computer (systemLock)
Lock the screen. The user stays signed in, but a person must unlock the screen before desktop steps can run.
Inputs
No inputs.
Outputs
No output variables.
Example
Put it as the last step.
Expected result
Windows shows the lock screen. The action does not wait for unlock.
Logoff (systemLogoff)
Sign out of Windows. The session ends; work in it can be interrupted.
Inputs
Uses the shared fields.
Outputs
No output variables.
Example
Put it as the last step, with force=false. Use force=true only if open applications and unsaved data can be lost.
Expected result
Windows gets the sign-out request. The action does not confirm that it finished. An application can block it when force=false.
Restart (systemRestart)
Restart the Device. The current Run can be interrupted.
Inputs
Uses the shared fields.
Outputs
No output variables.
Example
Put it as the last step, with force=false.
Expected result
Windows gets the restart request. The action does not confirm that it finished. An application can block it when force=false.
Shutdown (systemShutdown)
Shut down the Device. The current Run can be interrupted.
Inputs
Uses the shared fields.
Outputs
No output variables.
Example
Put it as the last step, with force=false.
Expected result
Windows gets the shutdown request. The action does not confirm that it finished. An application can block it when force=false.