
how to set PATH (environment) using WSH?
can you show me an example of how append a directory to the system path, for
a windows 2000 machine?
Quote:
> In dos, you can type: path %path%;c:\newdirectory
> and this will add the path "c:\newdirectory" to your existing path
> environment within dos...
> How can I set this through a script? I need all my user's paths to
> have "c:\newdirectory" appended to the end...
On NT and higher, you can use the WshEnvironment object (via the
WshShell.Environment property) to access and modify environment variables in
the Process, User, System, and Volatile environments. On Win9x/ME, only the
Process environment is accessible, so changes made aren't persistent.
--
Michael Harris
Microsoft.MVP.Scripting
Seattle WA US
--