Master Environment 
Author Message
 Master Environment

I have a Win2000 Pro PC.  I would like to have WSH set an evironment
variable in the master environment.  Can this be done?  If so, how?

Thanks.

Don Ireland
_______________________________________________
????????????????????????

Remember, a man's life is what his thoughts make of it.



Sun, 18 May 2003 03:00:00 GMT  
 Master Environment
If by Master you mean System or User (not Process which is a transient per process copy)...

WshEnvironment Object
http://msdn.microsoft.com/scripting/windowshost/doc/wsObjWshEnvironme...

--
Michael Harris
Microsoft.MVP.Scripting
--

Please do not email questions - post them to the newsgroup...
--

Quote:

> I have a Win2000 Pro PC.  I would like to have WSH set an evironment
> variable in the master environment.  Can this be done?  If so, how?

> Thanks.

> Don Ireland
> _______________________________________________
> ????????????????????????
>

> Remember, a man's life is what his thoughts make of it.



Sun, 18 May 2003 03:00:00 GMT  
 Master Environment
I tried using this, but it would not let me set ENvironment properties.
ANyone have other suggestions?

Quote:

>If by Master you mean System or User (not Process which is a transient per
process copy)...

>WshEnvironment Object
>http://msdn.microsoft.com/scripting/windowshost/doc/wsObjWshEnvironme...

>--
>Michael Harris
>Microsoft.MVP.Scripting
>--

>Please do not email questions - post them to the newsgroup...
>--




- Show quoted text -

Quote:
>> I have a Win2000 Pro PC.  I would like to have WSH set an evironment
>> variable in the master environment.  Can this be done?  If so, how?

>> Thanks.

>> Don Ireland
>> _______________________________________________
>> ????????????????????????
>>

>> Remember, a man's life is what his thoughts make of it.



Sat, 31 May 2003 03:52:30 GMT  
 Master Environment
set shell = createobject("wscript.shell")
set sysenv = shell.environment("system")
sysenv("foobar") = "the value of foobar"

Same for "user" or "process" environments - only "system" and "user" (on non-Win9x) are persistent
and Win9x supports only "process"...

--
Michael Harris
Microsoft.MVP.Scripting
--

Please do not email questions - post them to the newsgroup instead.
--

Quote:

> I tried using this, but it would not let me set ENvironment properties.
> ANyone have other suggestions?


> >If by Master you mean System or User (not Process which is a transient per
> process copy)...

> >WshEnvironment Object
> >http://msdn.microsoft.com/scripting/windowshost/doc/wsObjWshEnvironme...

> >--
> >Michael Harris
> >Microsoft.MVP.Scripting
> >--

> >Please do not email questions - post them to the newsgroup...
> >--



> >> I have a Win2000 Pro PC.  I would like to have WSH set an evironment
> >> variable in the master environment.  Can this be done?  If so, how?

> >> Thanks.

> >> Don Ireland
> >> _______________________________________________
> >> ????????????????????????
> >>

> >> Remember, a man's life is what his thoughts make of it.



Sun, 01 Jun 2003 03:29:31 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. environment variables: wshshell.environment or wshshell.expandenv ironmentstrings?

2. Generating AFMs for Multiple Master Fonts?

3. trying to master ms software....

4. Multiple Master Fonts

5. Adobe's multiple master fonts

6. Single Master Font Instance

7. multiple master fonts

8. Multiple Master Fonts

9. PS master==>data==>merge to new PS file

10. Mastering Microsoft Visual Basic

11. Announcement: New Multiple Master Font Resource

12. Master-detail using ADO

 

 
Powered by phpBB® Forum Software