Set oShell = CreateObject("WScript.Shell") value = oShell.ExpandEnvironmentStrings("%my_env_variable%") WScript.Echo value