This is the example, a shortcut was installed to this code
:
'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
' $Header: C:/DBAREIS/Projects.PVCS/Win32/ScriptingTipsAndTricks/EXAMPLE[vbs].GetEnv() [Get Environment Variables].vbs.txt.pvcs 1.0 11 Jul 2014 19:31:06 USER "Dennis" $
'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
dim oShell : set oShell = CreateObject("WScript.Shell")
'============================================================================
function GetEnv(EnvName)
'============================================================================
dim Try
Try = "%" & EnvName & "%"
GetEnv = oShell.ExpandEnvironmentStrings(Try)
if GetEnv = Try then
GetEnv = ""
end if
end function