From: Curt Hibbs Date: 2006-08-01T01:43:58+09:00 Subject: Re: Environment variables with empty value missing from ENV? On 7/31/06, nobu@ruby-lang.org wrote: > Hi, > > At Mon, 31 Jul 2006 22:57:03 +0900, > Curt Hibbs wrote in [ruby-talk:205183]: > > > Win32 API GetEnvirionmentVariable() doesn't tell if the > > > variable is empty or unset. Actually, there is no way to set > > > an empty environment variable by cmd.exe. I'm not sure if it > > > is misfeature or restriction by design. > > > > As far as I know, Windows uses an empty env. var. as a signal to > > delete that env. var. > > In accurate, Windows allows an empty env var, but cmd.exe (and > of course, command.com) uses it to delete it. > > $ ./ruby -e 'ENV["FOO"]="";p system("cmd /c set FOO")' > FOO= > true > > And, usa has fixed the empty value issue today. > > -- > Nobu Nakada Ok... thanks! Curt