Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

Environment Values

 [1/4] from: dness:home at: 5-Jul-2001 20:47


I've checked all the documentation I can think of, but still can't figure out how to access the value of a Windows `Environmental Variable'. Can someone point me in the right direction?

 [2/4] from: jeff::rebol::net at: 5-Jul-2001 18:50


Howdy, David:
> I've checked all the documentation I can think of, but still can't figure > out how to access the value of a Windows `Environmental Variable'. Can > someone point me in the right direction?
Using Command you can make the C function "getenv" into a routine. In core you would need to pass in the environment variable from the command line. Knowwhutimean? -jeff

 [3/4] from: dness:home at: 5-Jul-2001 22:55


Jeff Kreis wrote:
> Howdy, David: > > I've checked all the documentation I can think of, but still can't figure
<<quoted lines omitted: 4>>
> variable from the command line. Knowwhutimean? > -jeff
I do, and thanks for the help. Doesn't make me happy (environmental values are important, particularly in organizing disks across networks), but knowing that there's nothing hidden in REBOL to do this important job saves me a lot of searching that would ultimately prove to be pointless...

 [4/4] from: brian:hawley at: 12-Jul-2001 17:15


(I'm a little behind on my email...) Long ago, David Ness wrote:
>I've checked all the documentation I can think of, but still can't figure >out how to access the value of a Windows `Environmental Variable'. Can >someone point me in the right direction?
With /Command or /Pro you can access the C getenv function from the C library, or you can use the call function like a: "" call/output "echo %PATH%" a or for all variables a: "" call/output "set" a With all REBOLs you can pass them on the command line like rebol.exe --do "app-paths: {%PATH%}" blah.r and even preprocess them like this rebol.exe --do "app-paths: parse {%PATH%} {;}" blah.r which returns the PATH variable broken into its components. I used a trick like the latter one to implement REBOL batch files that could be anywhere in the PATH directories. A little late, but it might help. Brian Hawley

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted