Windows RRT

The Windows RRT allows AutoStore workflows to access values from Windows environment variables that are defined on a system.

Environment variables provide information about drivers, network connections, application folders, and other program-related details. These variables are categorized as user variables and system variables. User variables are defined for the current user profile. System variables are defined by the operating system.

Environment variables are stored in the Windows registry (regedit.exe):

User variables
HKEY_CURRENT_USER\Environment
System variables
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment
Tip: In a Windows command window, you can use the SET command to display, set, or remove environment variables on a system.

RRT ID

The RRT ID for the Windows RRT is WIN. The format for a Windows RRT is the following:

~ WIN :: VariableName ~

In place of VariableName, insert the name of an environment variable that is defined on your system. When you specify a user variable, it must belong to the user profile that will be running AutoStore workflows.

Standard environment variables

The following table lists standard built-in environment variables. Unless stated otherwise, all the following variables are system variables. There may be additional user variables available at run time.

Table 1. Standard environment variables
Variable Read-only Default value (Windows 7/2008)
ALLUSERSPROFILE   C:\ProgramData
CD Yes

The current directory (string). This is a dynamic environment variable.

Note: The dynamic environment variables =C: and =D: expand to the current directory on the C: drive and the D: drive, respectively (if the D: drive has been accessed in the current process).
ClientName Yes Computer name of a remote host (terminal servers only).
CMDEXTVERSION Yes

The current command processor extensions version number (Disabled = 0, Windows NT = 1, Windows 2000 or later = 2). This is a dynamic environment variable.[†]

CMDCMDLINE Yes

The original command line that invoked the command processor. This is a dynamic environment variable.[†]

CommonProgramFiles  
C:\Program Files\Common Files
COMMONPROGRAMFILES(x86)  
C:\Program Files (x86)\Common Files
COMPUTERNAME  

Computer name of the local host.

COMSPEC  
C:\Windows\System32\cmd.exe
DATE Yes

The current date using same region specific format as date. This is a dynamic environment variable.[†]

ERRORLEVEL Yes

The current error level value, automatically set when a program exits. This is a dynamic environment variable.[†]

HOMEDRIVE Yes C:
HOMEPATH Yes

Home path for the current user profile:

Users\username
LOCALAPPDATA  

Application data folder for the current user profile:

C:\Users\username\AppData\Local
LOGONSERVER  

Network logon server for the operating system:

\\domain_logon_server
NUMBER_OF_PROCESSORS Yes

The Number of processors running on the computer.

OS Yes

Operating system on the workstation.

PATH  

User and system (C:\Windows\System32\;C:\Windows\;C:\Windows\System32\Wbem;) plus program paths with semicolon separators.

PATHEXT  

Path extensions with semicolon separators:

.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.WSF;.WSH;.MSC
PROCESSOR_ARCHITECTURE Yes

Processor type of the host machine.

PROCESSOR_IDENTIFIER Yes

Processor ID of the host machine.

PROCESSOR_LEVEL Yes

Processor level of the host machine.

PROCESSOR_REVISION Yes

Processor version of the host machine.

ProgramData  

Program data folder:

C:\ProgramData
ProgramFiles  

Program files folder:

C:\Program Files
ProgramFiles(x86)  

Program files folder used on 64-bit systems to store 32-bit program files:

C:\Program Files (x*6)
PROMPT  

Code for current command prompt format, typically:

$P$G C:>
PSModulePath set  
%SystemRoot%\system32\WindowsPowerShell\v1.0\Modules\
Public  
C:\Users\Public
RANDOM Yes

A random decimal number between 0 and 32767. This is a dynamic environment variable.[†]

SessionName  

For a terminal server session, SessionName is a combination of the connection name, followed by #SessionNumber. For a console session, SessionName returns Console. This is for terminal servers only.

SYSTEMDRIVE  
C:
SYSTEMROOT  
C:\Windows
TEMP and TMP  

User variable for the temporary file folder:

C:\Users\Username\AppData\Local\Temp
TIME Yes

The current time using the regional time format. This is a dynamic environment variable.

[†]
UserDnsDomain Yes

User variable set if a user is a logged on to a domain and returns the fully qualified DNS domain that the currently logged on user's account belongs to.

USERDOMAIN  

user domain

USERNAME  

user name

USERPROFILE  
%SystemDrive%\Users\username
WINDIR  
C:\Windows
  • Dynamic environment variables are read-only and are computed each time the variable is expanded. When environment variables are listed in a Windows command window with SET, these will not appear in the list. The values can be expanded with ECHO %variable_name%.