This is the mail archive of the cygwin-xfree@cygwin.com mailing list for the Cygwin XFree86 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Environment variables


On Thu, Apr 12, 2001 at 12:57:55PM +1000, Robert Collins wrote:
> I can't believe I missed this point: (Maybe because I'm home sick with
> all sorts of horrible symptoms - I shouldn't even be on the Net.)

Are you just joking ;-)

> If anyone here writes batch files that test for the OS, %OS%="" is _NOT_
> valid for win9x. At least one major Networking client sets %OS%
> automatically on login (Novell).

I might be Novell or our Sys Admin. All I know is that it is not in my
autoexec.bat file.

I was surprised to learn that my LAN account had OS=WIN95 set automagically.
This does not run well with OS="" in startxwin.bat. I'm glad it is being 
fixed soon. Thus faking it in .bashrc to OS="" did the trick for me.

> The most reliable tests I found where a little convoluted, and I don't
> have them handy, but the logic was basically:
> 
> test for known OS values.
> if missing
>   test for known win 95/98/ME only files
>     if missing
>       win3.x or dos
>    endif
> endif
> 
> I actually went on to test for dos vs win3.x but I think that's probably
> a little extreme here.
> 
> Rob
> 

Yup.

EW 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]