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
Here's an example (taken from here):
Set oShell = CreateObject( "WScript.Shell" ) user=oShell.ExpandEnvironmentStrings("%UserName%") comp=oShell.ExpandEnvironmentStrings("%ComputerName%") WScript.Echo user & " " & comp