Is is possible to read system environment variables in a Windows Scripting Host (WSH) VBS script?
(I am writing a VBScript using Windows Scripting Host for task for a Cruise Control and want to pick up the project build URL.)
Is is possible to read system environment variables in a Windows Scripting Host (WSH) VBS script?
(I am writing a VBScript using Windows Scripting Host for task for a Cruise Control and want to pick up the project build URL.)
From here ...
Set WshShell = WScript.CreateObject("WScript.Shell")
Set WshProccessEnv = WshShell.Environment("Process")
Set WshSysEnv = WshShell.Environment("System")
Wscript.Echo WshSysEnv("NUMBER_OF_PROCESSORS")
Wscript.Echo WsProcessEnv("Path")
Also, much more detail on TechNet.