Enumerating Environment keys with VBScript?

Posted by Stabledog on Stack Overflow See other posts from Stack Overflow or by Stabledog
Published on 2010-05-27T16:29:14Z Indexed on 2010/05/27 16:31 UTC
Read the original article Hit count: 172

Filed under:
|

I need to enumerate the keys in the WScript.Shell.Environment object. It's clear that if you already know the name of the key, you're home free with:

Set oShell = WScript.CreateObject("WScript.Shell")
Debug.WriteLine "PATH=" & oShell.Environment("PATH")

...but if you want to list the keys, it looks like you're out of luck! Is there a secret passageway somewhere?

© Stack Overflow or respective owner

Related posts about api

Related posts about vbscript