Module: siteKiosk.system.environment

This module provides access to environment variables. It also offers the ability to replace certain environment variables in a string with their machine dependent counterpart. A list of all available environment variables can be found below.

Example

// this will log the correct SiteKiosk path on every device
var variables = siteKiosk.system.environment.variableNames;
var pathVariable = variables.siteKioskPath;
var pathString = siteKiosk.system.environment.expand("Your path is $(pathVariable)!");
console.log(pathString);

Members

<static> variableNames :string

Supported variable names.
Type:
  • string
Properties:
Name Type Default Description
appData string AppData
commonApplicationData string CommonApplicationData
siteKioskPath string SiteKioskPath
externalStorage string ExternalStorage
siteKioskData string SiteKioskData
siteKioskDownloads string SiteKioskDownloads
siteKioskConfig string SiteKioskConfig
appCommonDataDirectory string AppCommonDataDirectory
applicationCommonDataDirectory string ApplicationCommonDataDirectory
newline string newline
deviceModel string DeviceModel
currentLocale string CurrentLocale
computerName string ComputerName
computerGUID string ComputerGUID
runningAsLimitedUser string RunningAsLimitedUser

Methods

<static> expand(text) → {string}

Expands a text with placeholders using environment variables. Use $(VariableName) as placeholder to be replaced with the actual environment variable.
Parameters:
Name Type Description
text string The text with placeholders to be expanded
Returns:
The expanded text
Type
string

<static> getVariable(name) → {string}

Gets the value of an environment variable.
Parameters:
Name Type Description
name string Name of the environment variable
Returns:
The value of the specified environment variable
Type
string