Re: Parse current IP address into environment variables

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance




"James Whitlow" <jwhitlow.60372693@xxxxxxxxxxxxx> wrote in message
news:evGf$nisJHA.528@xxxxxxxxxxxxxxxxxxxxxxx
"Pegasus [MVP]" <news@xxxxxxxxxxxxx> wrote in message
news:%23nT9JNisJHA.2776@xxxxxxxxxxxxxxxxxxxxxxx

Each process inherits its environmental variables from its "parent". When
a process terminates then the "child" variables are discarded. To set an
environmental variable from within a VB Script would therefore make
little sense - unless you used a specialised tool that sets the master
environment. Even then you would see the result only in processes that
you launch *after* running your script. Processes that were launched
*before* would be unaware of this variable.

I have had good luck using volatile environment variables. They are still
not visible to processes that were launched before the script, but they
are visible to both new and child processes launched after the script. I
have only tried this in WinXP Pro, so I don't know if this is true in
other versions of Windows.

If I understood the OP correctly when he said "and using them to "write" the
information into several files upon the first boot of a system", he would
seem to need those volatile environment variables to remain through a
reboot.

/Al

Set oWSH = CreateObject("WScript.Shell")
oWSH.Environment("volatile").Item("MyVariable") = "Hello"



.



Relevant Pages

  • Re: logon/logoff scripts...
    ... I am using the %clientname% and %machine% name environment variables to ... each user you can specify a login script but nowhere do I see the ...
    (microsoft.public.backoffice.smallbiz2000)
  • Re: Startup script ?
    ... I.E where do I put the script ... Every process has a set of environment variables, ... If there is some script that runs apt-get ... that will get set whenever *lots* of users login, ...
    (Debian-User)
  • Re: exporting a variable to global shells
    ... Environment variables are a user-space concept - ... When the script is exiting the echo stdout's the proxy adress, ... setting up my network differently depending on where/what I connect to. ... With regard to actually *setting* the proxy server, ...
    (Debian-User)
  • RE: DBD::Oracle install failed for fork test in t/10general.t
    ... environment variables $ORACLE_SID and $TWO_TASK. ... the connection is local and a dedicated server is bequeathed ... I'm not sure what 'Unix init process' is, ... It works when I ran a script pointing to the 'blib'. ...
    (perl.dbi.users)
  • Re: Which PHP am I running?
    ... php-win.exe) that is currently running (ie. how was this script called) ... apache2handler when I'm running php as a web server module. ... But why does it matter if its using the nix or the windows php ... If you're worried about differences between environment variables ...
    (comp.lang.php)