Detecting OS/Windows 
Author Message
 Detecting OS/Windows

Hello!

I'm looking for a reliable way to detect the following OS in Borland
Pascal 7.0:

- MS DOS 7.x
- MS DOS 8.0 (from ME with ripped off GUI)
- Windows 95 (GUI)
- Windows 98/98SE
- Windows ME
- Windows NT
- Windows 2000
- Windows XP

I'm writing some DOS app. There I want to know, whether I run under pure
DOS or under Windooze. It would be fine if this detection couldn't be
fooled by the Windows option not to show Windows presence (disabled
detection of windows).

Thanks in advance.

Markus



Wed, 10 Mar 2004 14:47:56 GMT  
 Detecting OS/Windows

Quote:

> Hello!

> I'm looking for a reliable way to detect the following OS in Borland
> Pascal 7.0:

> - MS DOS 7.x
> - MS DOS 8.0 (from ME with ripped off GUI)
> - Windows 95 (GUI)
> - Windows 98/98SE
> - Windows ME
> - Windows NT
> - Windows 2000
> - Windows XP

> I'm writing some DOS app. There I want to know, whether I run under pure
> DOS or under Windooze. It would be fine if this detection couldn't be
> fooled by the Windows option not to show Windows presence (disabled
> detection of windows).

Simply use winver (a multiplex interrupt installation check IIRC, see RB),
and then check for LFN extensions, to keep dos and Win9x apart ?


Fri, 12 Mar 2004 15:46:15 GMT  
 Detecting OS/Windows
[snip]

Quote:

> Simply use winver (a multiplex interrupt installation check IIRC, see RB),
> and then check for LFN extensions, to keep dos and Win9x apart ?

Hm, not bad idea. Does this work under Windows 2000 and XP too? Do they
have the LFN extensions?

Markus



Fri, 12 Mar 2004 23:53:38 GMT  
 Detecting OS/Windows

Quote:

> [snip]

>> Simply use winver (a multiplex interrupt installation check IIRC, see RB),
>> and then check for LFN extensions, to keep dos and Win9x apart ?

> Hm, not bad idea. Does this work under Windows 2000 and XP too? Do they
> have the LFN extensions?

- NT systems don't have dos modes.
- but 2000 and XP have LFN (buggy though)


Fri, 12 Mar 2004 23:59:28 GMT  
 Detecting OS/Windows

Quote:
> [snip]

> Hm, not bad idea. Does this work under Windows 2000 and XP too? Do they
> have the LFN extensions?

Using the LFN extensions for detecting Windows anything is a bad idea, since
there is a DOS device driver available NOW that provides LFN's, and
potentially new DOS O/S's in the future that will support them generically.

--
Jay

Jason Burgon - Author of "Graphic Vision"  GUI for DOS/DPMI
=== Free LFN capable Dos/WinDos replacement and ===
=== New Graphic Vision  version 2.12 available from:  ===
http://www.jayman.demon.co.uk



Sat, 13 Mar 2004 05:53:53 GMT  
 Detecting OS/Windows

Quote:



>> [snip]

>> Hm, not bad idea. Does this work under Windows 2000 and XP too? Do they
>> have the LFN extensions?

> Using the LFN extensions for detecting Windows anything is a bad idea, since
> there is a DOS device driver available NOW that provides LFN's, and
> potentially new DOS O/S's in the future that will support them generically.

Yes, but using that as a generic detection is also bad, since 99.9% of the
people will be using a win9x windows.


Sun, 14 Mar 2004 01:07:44 GMT  
 Detecting OS/Windows

Quote:



>>>[snip]

>>>Hm, not bad idea. Does this work under Windows 2000 and XP too? Do they
>>>have the LFN extensions?

>>Using the LFN extensions for detecting Windows anything is a bad idea, since
>>there is a DOS device driver available NOW that provides LFN's, and
>>potentially new DOS O/S's in the future that will support them generically.

> Yes, but using that as a generic detection is also bad, since 99.9% of the
> people will be using a win9x windows.

Problem solved by finding some C code. (hm, this C code is being
translated to BP now...can't stand this C trash...;-))

If somebody needs it: mail me.

Markus



Mon, 15 Mar 2004 03:50:36 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. Detecting OS/Windows

2. Detecting Windows from non-Windows program

3. WINDOWS ALTERNATIVE - OMNI OS

4. using windows(not the os)

5. WINDOWS ALTERNATIVE - OMNI OS

6. Delphi-Application for OS/2, Mac and Windows?

7. FA: Virtual Pascal for OS/2, RexxVIM for OS/2

8. detecting windows version from TP7?

9. Detecting Windows from a dos box...

10. Detect Windows 98

11. Detecting Windows

12. Detecting Windows DOS box

 

 
Powered by phpBB® Forum Software