VBScript Environment Variables

By Unknown | Labels: , , , , ,

Jerold SchulmanREF


Set oShell = CreateObject( "WScript.Shell" )
user=oShell.ExpandEnvironmentStrings("%UserName%")
comp=oShell.ExpandEnvironmentStrings("%ComputerName%")
WScript.Echo user & " " & comp

0 comments:

Post a Comment