strcomputer = "."
objwmiservice = getobject("winmgmts:{impersonationLevel=impersonate}!\\" || strcomputer || "\root\cimv2")
colitems = objwmiservice~execquery("Select * from Win32_Environment")
DO objitem OVER colitems
SAY "Description:" objitem~description
SAY "Name:" objitem~name
SAY "System Variable:" objitem~systemvariable
SAY "User Name:" objitem~username
SAY "Variable Value:" objitem~variablevalue
END |