Get Windows Environment Info

To get the Environment info like Compsec, PAth, pathext windows folder and temporary folder location we can do like this

Set WshShell = WScript.CreateObject("WScript.Shell")
Set WshSysEnv = WshShell.Environment("SYSTEM")
WScript.Echo "COMSPEC (Executable file for the command prompt ) : " &_

WScript.Echo "PATH : " & WshSysEnv("PATH")
WScript.Echo "PATHEXT : " & WshSysEnv("PATHEXT")

WScript.Echo "WINDIR : " & WshSysEnv("WINDIR")
WScript.Echo "TEMP : " & WshSysEnv("TEMP")

One Reply to “Get Windows Environment Info”

  1. October 23, 2012 5:10 pm by I have been absent for a while, but now I rmmbeeer why I used to love this web site. Thank you, I will try and check back more often. How frequently you update your web site?

Leave a Reply

Your email address will not be published. Required fields are marked *