Discussion:
How can you tell the difference programatically between Windows 8 and Windows 10 (from the desktop, not server versions)?
m***@mbsoftwaresolutions.com
2018-11-15 05:51:13 UTC
Permalink
VFP9SP2

According to http://fox.wikis.com/wc.dll?Wiki~VFPFunctionOS, it looks
like 8 and 10 return the same values?

Windows 7 Windows 6.01 OS(5) returns "7600" AND OS(11) returns "1"
Windows 7 SP1 Windows 6.01 OS(5) returns "7601" AND OS(11) returns "1"
Windows 8 Dev Preview Windows 6.02 OS(5) returns "8102" AND OS(11)
returns "1"


Windows 8 (Release) Windows 6.02 OS(5) returns "9200" AND OS(11) returns
"1"
Windows 8.1 Windows 6.02 OS(5) returns "9200" (why not 9600?) AND OS(11)
returns "1"
Windows 10 Windows 6.02 OS(5) returns "9200" AND OS(11) returns "1"

_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/***@mbsoftwaresolutions.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Man-wai Chang
2018-11-15 14:02:48 UTC
Permalink
Time to make a Win32 API call? Or maybe just calling DOS command "VER"?

On Thu, Nov 15, 2018 at 1:50 PM
Post by m***@mbsoftwaresolutions.com
VFP9SP2
According to http://fox.wikis.com/wc.dll?Wiki~VFPFunctionOS, it looks
like 8 and 10 return the same values?
....
--
.~. Might, Courage, Vision. SINCERITY!
/ v \ 64-bit Fedora 25 Server Spin
/( _ )\ http://sites.google.com/site/changmw
^ ^ May the Force and farces be with you!

_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/CAGv=MJDc1szwd4uw5zCZi6LF=***@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Man-wai Chang
2018-11-15 14:03:56 UTC
Permalink
Found an old post via Google:

Windows 10 returns same Win Version (6.02) as Windows 8.1 (Using VFP
OS() function)
https://social.msdn.microsoft.com/Forums/en-US/ba6983f6-c864-4051-9495-9e2cefdbeb5f/windows-10-returns-same-win-version-602-as-windows-81-using-vfp-os-function?forum=visualfoxprogeneral
On Thu, Nov 15, 2018 at 1:50 PM
Post by m***@mbsoftwaresolutions.com
VFP9SP2
According to http://fox.wikis.com/wc.dll?Wiki~VFPFunctionOS, it looks
like 8 and 10 return the same values?
Windows 7 Windows 6.01 OS(5) returns "7600" AND OS(11) returns "1"
Windows 7 SP1 Windows 6.01 OS(5) returns "7601" AND OS(11) returns "1"
Windows 8 Dev Preview Windows 6.02 OS(5) returns "8102" AND OS(11)
returns "1"
Windows 8 (Release) Windows 6.02 OS(5) returns "9200" AND OS(11) returns
"1"
Windows 8.1 Windows 6.02 OS(5) returns "9200" (why not 9600?) AND OS(11)
returns "1"
Windows 10 Windows 6.02 OS(5) returns "9200" AND OS(11) returns "1"
[excessive quoting removed by server]

_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/CAGv=MJAPtn0WCNRrNxWa5iryRd7N_HmEH9A1-***@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Alan Bourke
2018-11-15 15:22:37 UTC
Permalink
Close All
Clear All
Clear

objWMIService = Getobject("winmgmts:" ;
+ "{impersonationLevel=impersonate}!\\.\root\cimv2")
colOperatingSystems = objWMIService.ExecQuery("Select * from Win32_OperatingSystem")

objOs = colOperatingSystems.ItemIndex(0)

* -- See https://docs.microsoft.com/en-us/windows/desktop/cimwin32prov/win32-operatingsystem
? objOS.Caption
? objOs.BuildNumber
? objOs.Name
--
Alan Bourke
alanpbourke (at) fastmail (dot) fm

_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/***@webmail.messagingengine.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Loading...