Promotic
WikipediaLinkedInYoutubeTwitterFacebook

WinEnviromentRead - method of object Pm

Description:
Environment variable read.
Syntax:
WinEnviromentRead(sName As String) As String
Calling:
s = Pm.WinEnviromentRead(sName)
Parameters:
sName(String) Environment variable name (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 OS Windows setting the variables with the values for the computer and the user can be defined).

The basic set of environmental variables can be displayed in the command line by the Set command.

 
This method is not functional for Web panels in JavaScript language (and therefore it is not working in Web panels).
Example:
Detects the computer name by reading the value of the environmental variable COMPUTERNAME:
VBScriptSelect and copy to clipboard

Dim sCompName
sCompName = Pm.WinEnviromentRead("COMPUTERNAME")
PROMOTIC 9.0.0 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
Navigation:
 
- Pm
 
- Abs
- Cos
- E
- Exp
- LN2
- PI
- Pow
- Sin
- Tan
- WinEnviromentRead
 
 
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice