OS() reports incorrect OS version under VFP 5.0a 
Author Message
 OS() reports incorrect OS version under VFP 5.0a

Everyone:

I have Visual Fox 5.0a.  OS(1) is reporting the wrong operating system
version under Windows '95.  It gives a result
of "4.00" when it should be "3.95".  Under NT 4.0 it gives the same
result as under Windows '95.  I have an
application that needs to be able to detect when it is running under
NT.  I found some old code in the
MS Knowledge Base for making this determination with FPW 2.6, but the
routine doesn't work under VFP.
Any assistance with this would be greatly appreciated.

Thanks,

Michael Guiraut
SVAS.



Mon, 04 Dec 2000 03:00:00 GMT  
 OS() reports incorrect OS version under VFP 5.0a

Michael,
Rick Strahl provided a little routine in FPAdvisor 6/96 in the
Tips,Tricks,Traps column on p.16 that help sort out these differences. While
I can't post this copyrighted code, the key that he uses is to first look
for "NT" in OS(1), then look for "4." or "3.9" for Win95.

Rick

Quote:

>Everyone:

>I have Visual Fox 5.0a.  OS(1) is reporting the wrong operating system
>version under Windows '95.  It gives a result
>of "4.00" when it should be "3.95".  Under NT 4.0 it gives the same
>result as under Windows '95.  I have an
>application that needs to be able to detect when it is running under
>NT.  I found some old code in the
>MS Knowledge Base for making this determination with FPW 2.6, but the
>routine doesn't work under VFP.
>Any assistance with this would be greatly appreciated.

>Thanks,

>Michael Guiraut
>SVAS.



Mon, 04 Dec 2000 03:00:00 GMT  
 OS() reports incorrect OS version under VFP 5.0a

Rick:

The problem is that OS(1) returns exactly the same thing under either Windows 95

or NT!  Mr. Strahl's routine will not work, since it relies on OS().

Michael Guiraut
SVAS.

Quote:

> Michael,
> Rick Strahl provided a little routine in FPAdvisor 6/96 in the
> Tips,Tricks,Traps column on p.16 that help sort out these differences. While
> I can't post this copyrighted code, the key that he uses is to first look
> for "NT" in OS(1), then look for "4." or "3.9" for Win95.

> Rick


> >Everyone:

> >I have Visual Fox 5.0a.  OS(1) is reporting the wrong operating system
> >version under Windows '95.  It gives a result
> >of "4.00" when it should be "3.95".  Under NT 4.0 it gives the same
> >result as under Windows '95.  I have an
> >application that needs to be able to detect when it is running under
> >NT.  I found some old code in the
> >MS Knowledge Base for making this determination with FPW 2.6, but the
> >routine doesn't work under VFP.
> >Any assistance with this would be greatly appreciated.

> >Thanks,

> >Michael Guiraut
> >SVAS.



Wed, 06 Dec 2000 03:00:00 GMT  
 OS() reports incorrect OS version under VFP 5.0a

Quote:

>The problem is that OS(1) returns exactly the same thing under either
Windows 95
>or NT!  Mr. Strahl's routine will not work, since it relies on OS().

That's weird - on my system OS(1) in VFP 5.0a returns "Windows NT 4.00" (I'm
running Windows NT Workstation 4.0 with SP3).

You could try:

 ? getenv("windir")

to return the name of the Windows directory.  However, although that's
normally C:\WINNT for NT, I suppose NT/95 could be installed to any
directory.

What about:

? getenv("comspec")

That returns c:\winnt\system32\cmd.exe on my system.  I _think_ Win 95 uses
command.com instead, but you'd have to test that.

Matt McQueen
Matt McQueen Software Ltd.



Wed, 06 Dec 2000 03:00:00 GMT  
 OS() reports incorrect OS version under VFP 5.0a

Quote:
>What about:

>? getenv("comspec")

>That returns c:\winnt\system32\cmd.exe on my system.  I _think_ Win 95 uses
>command.com instead, but you'd have to test that.

Yup, Matt.  You get COMMAND.COM in Win 95.
Quote:
>L<



Sat, 09 Dec 2000 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. OS version and VFP

2. How VFP3.0a get OS information

3. Help - bizarre problem with form controls in 5.0a - seems to be OS or hardware related

4. Determining OS version.

5. How to know the version of OS runnig in fpw26

6. Dectecting the OS-version in foxprow 2.5

7. os version

8. FPW26 - Reporting troubles (driver, os, fp???)

9. VFP will not run on OS/2 Warp, *sigh*

10. VFP 3.0b & OS/2

11. VFP 6.0 and Mac OS

12. VFP OS()

 

 
Powered by phpBB® Forum Software