WinBatch® Technical Support Forum

All Things WinBatch => WinBatch => Topic started by: Russell_Williams on August 04, 2015, 11:18:07 AM

Title: Windows 10 Versioning
Post by: Russell_Williams on August 04, 2015, 11:18:07 AM
Anyone try getting the version on a Windows 10 system?
It looks to me like it shows a Win 10 as Win 8.1 (2-6-2 / 6.3)

http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/nftechsupt.web+WinBatch/Win8+WinVersion~Issue~With~Windows~8_1.txt

Title: Re: Windows 10 Versioning
Post by: td on August 04, 2015, 12:58:17 PM
That is the case only if you are not using the latest version of WinBatch.  In WinBatch 2015B WinVersion(5) reports Windows 10 as 2-10-0.   MSFT has placed version lying technology into  most versions of Windows since Vista.   You will have to ask MSFT why the do things that way.
Title: Re: Windows 10 Versioning
Post by: DAG_P6 on August 04, 2015, 02:30:06 PM
Quote from: Russell_Williams on August 04, 2015, 11:18:07 AM
Anyone try getting the version on a Windows 10 system?
It looks to me like it shows a Win 10 as Win 8.1 (2-6-2 / 6.3)

I encountered this problem a couple of months ago, when I was developing improvements to a method of identifying the file to which a standard handle was redirected. In the course of my investigation, I found "Part1: Overcoming Windows 8.1's deprecation of GetVersionEx and GetVersion APIs," at http://www.codeproject.com/Articles/678606/Part-Overcoming-Windows-s-deprecation-of-GetVe, and used the information to develop an improved method that returns the true Windows version via RtlGetVersion, a function exported by ntdll.dll (meaning that it's probably supposed to be off limits to user programs).

I suspect that you guys probably did something similar. Nevertheless, it was an interesting expedition deep into the innards of Windows. I don't know that I have ever heretofore called into NTDLL directly, though I have had plenty of programs die there.
Title: Re: Windows 10 Versioning
Post by: td on August 04, 2015, 05:38:18 PM
We are well aware of the RtlGetVersion and have been for a long time...
Title: Re: Windows 10 Versioning
Post by: kdmoyers on August 05, 2015, 07:32:30 AM
It seems like MS is trying to eliminate version difference issues by making it difficult to query the version you are on.

Maybe their idea is to force you to program only features that are version independant?

Kirby
Title: Re: Windows 10 Versioning
Post by: td on August 05, 2015, 01:13:24 PM
Actually, it has to do with a lot of amateurishly  codded applications causing MSFT a lot of headaches every time they upgrade the OS.   
Title: Re: Windows 10 Versioning
Post by: DAG_P6 on August 06, 2015, 11:33:59 PM
Quote from: td on August 04, 2015, 05:38:18 PM
We are well aware of the RtlGetVersion and have been for a long time...

I thought so. I intended the remark mainly for people who are unable to upgrade for various (typically corporate) reasons.