If you're running the script inside a browser, I'm not aware that you can - there are so many restrictions imposed in this context (for good reason) that there's very little that you can usefully do.
OTOH if you're running under the Windows Scripting Host, or in an HTA, you can use the ExpandEnvironmentStrings of the WSH shell:
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.