WinEnviromentRead - method of the Pm object
Description:
Reading of environment variable.
Syntax:
String WinEnviromentRead(String sName)
Parameters:
sName | (String) Name of environment variable (case insensitive text). |
---|
Note:
The copy of environmental variables holds every
Windows process. The basic set of variables is created after starting the
Windows process, namely either the basic variables (e.g. computer name, procesor type, operating system, etc.), or the variables configured by the user (in the
Windows OS setting the variables with values for the computer and the user can be defined).
The basic set of environmental variables can be displayed from the command line by the
Set command.
This method
is not functional in
Web panels.
Example:
Detects the computer name by reading the value of the environmental variable COMPUTERNAME:
JavaScriptVBScriptSelect and copy to clipboard
var sCompName = Pm.WinEnviromentRead("COMPUTERNAME");
Dim sCompName
sCompName = Pm.WinEnviromentRead("COMPUTERNAME")