This is the mail archive of the
cygwin-xfree@cygwin.com
mailing list for the Cygwin XFree86 project.
Re: Environment variables
- To: Robert Collins <robert dot collins at itdomain dot com dot au>
- Subject: Re: Environment variables
- From: Enoch Wu <ewu at eskimo dot com>
- Date: Wed, 11 Apr 2001 21:49:53 -0700
- Cc: Cygwin-Xfree List <cygwin-xfree at cygwin dot com>
- References: <057201c0c2fc$60338470$0200a8c0@lifelesswks>
- Reply-To: Enoch Wu <ewu at eskimo dot com>
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