Re: Using System to read mixed cased environment variables on Windows



Dr.Ruud wrote:
ThierryLam schreef:

system("set PYTHON");
system("set ProgramFiles");

Output is:
PYTHON=C:\Python24\python.exe
PROGRAMFILES=C:\Program Files

You'll notice that through system, the environment variable
ProgramFiles is all in upper case. Is there a way to preserve the
mixed case of the environment variable through system(...)?

You need a newer Perl.


What does this show you?

C:> perl -wle "print qq{$_=$ENV{$_}} for keys %ENV;"

All of the keys of %ENV are capitalized for Windows as the environment variable
names aren't case-sensitive.

Rob
.



Relevant Pages

  • Re: Dell Garbage and Infinite Install Loop
    ... blue 'e' in the upper left hand corner of the start menu). ... install of windows with minimal free trial software pre-installed. ... For every person that I help get started with their Windows system, ...
    (alt.sys.pc-clone.dell)
  • Re: Cascading Windows
    ... I suspect you have got "Windows in Taskbar" set. ... Dim Upper As Long 'Upper boundary of array ... Do While Len> 0 ' Loop to put files into an array ... and allowing me to use the bottom 50% for the other 2 apps). ...
    (microsoft.public.word.customization.menustoolbars)
  • Re: Modifying windows layout(title bar)
    ... The menu though is located in the upper left corner and I ... I need to set the client windows location but I ... suppose to but implement my own title bar. ... the client area to be something> 0 of the non-client area I still get the ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Task Scheduler
    ... When you view the logged events in Event Viewer in the upper right corner, ... third button down is a copy to clipboard, then you can paste in the body of ... | Windows 2000 SP4 including all updates. ...
    (microsoft.public.win2000.general)
  • Re: Is there no compression support for large sized strings in Python?
    ... >> Perhaps it is possible to avoid to hold these big stings in memory. ... > As a matter of fact, it's Windows which reserved the upper 2 GB. ...
    (comp.lang.python)