Microsoft Operations Manager |
The GetEnvironmethod gets the specified environment variable from the environment of the current process.
[VBScript]
Utility.GetEnviron(EnvironmentVariable String)
String
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
Windows NT/2000: Requires Windows 2000 or later
Version: Requires MOM 1.0 SP1
Utility Object, ExpandEnvironmentStrings Method
Did you find this information useful? Please send your suggestions and comments about the documentation to momsdk@microsoft.com.