Get System Environment info





2
Date Submitted Mon. Jun. 25th, 2007 4:28 AM
Revision 1 of 1
Syntax Master sundaramkumar
Tags wscript
Comments 0 comments
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 ) : " & WshSysEnv("COMSPEC")

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

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

 

Comments

There are currently no comments for this snippet.

Voting

Votes Down