Microsoft Operations Manager

GetEnviron Method

The GetEnvironmethod gets the specified environment variable from the environment of the current process.

[VBScript]
Utility.GetEnviron(EnvironmentVariable String)

Parameters

EnvironmentVariable
Specifies the environment variable to retrieve.

Return Value

String

Examples

The following example shows how to get the PATH environment variable.

[VBScript] 
Function GetPath()
	Dim objUtil, strPath

	Set objUtil = CreateObject("OpScrUtil.Utility")

	strPath = objUtil.GetEnviron("PATH")

	Set objUtil = Nothing

	GetPath = strPath
End Function

Requirements

Windows NT/2000: Requires Windows 2000 or later
Version: Requires MOM 1.0 SP1

See Also

Utility Object, ExpandEnvironmentStrings Method


Did you find this information useful? Please send your suggestions and comments about the documentation to momsdk@microsoft.com.