How do SET a DOS environment variable 
Author Message
 How do SET a DOS environment variable

I've seen recent posts on how to GET a DOS
environment varible, but how do SET one?

Thanks in advance.

Patrick

Sent via Deja.com
http://www.*-*-*.com/



Mon, 28 Jul 2003 07:51:33 GMT  
 How do SET a DOS environment variable

Quote:

> I've seen recent posts on how to GET a DOS
> environment varible, but how do SET one?

> Thanks in advance.

> Patrick

The Environment property is read/write.  For example, ...

oWSHShell.Environment("Process")("MYVAR") = "Some string"

However, "System" variables (enduring) can only be set in Win 98/ME and
NT/2000.  Only "Process' variables can be set in Win 95.  The Winset.exe
utility must be used to set 'System' variables on a Win 95 machine and
such variables are lost upon a Windows shutdown.

The 'System' variables are only inherited by processes that are started
'external' to the script that sets them, while 'Process' variable are
only inherited by the processes started by the script that sets the
variable.

Tom Lavedas
-----------
http://www.pressroom.com/~tglbatch/



Tue, 29 Jul 2003 22:15:35 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. How to set a DOS environment variable

2. Set DOS Environment variable from VB 4.0??

3. Setting DOS Environment Variable

4. !!! Setting an environment variable in DOS-Prompt !!!!

5. setting a Dos environment variable

6. Setting DOS environment variable from VB Windows App

7. !!! Setting an environment variable in DOS-Prompt !!!!

8. Can I set a DOS environment variable?

9. How to set a DOS environment var

10. tapping into DOS environment variables

11. Reading Dos Environment Variables

12. DOS environment variables

 

 
Powered by phpBB® Forum Software