Environment variables
Robert Collins
robert.collins@itdomain.com.au
Wed Apr 11 19:58:00 GMT 2001
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.)
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).
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
More information about the Cygwin-xfree
mailing list