Bug 3655

osmajorrevision is giving 2 different values for windows 10 in powerbuilder 11.5 and powerbuilder 17 01 December, 2019

Prashant Mungase
21 November, 2019
Product: PowerBuilder Category: Other
Version: 2017 R3 Build:
Classification: Enhancement Publishing: Public
Priority: P3
Status: Transferring Reason:
Zhao Kai @Appeon 01 December, 2019
Hi Chris,

We will record it as a requirement in our CR pool, I will get back to you once we have a plan to support this feature.

Chris Pollach @Appeon 29 November, 2019
Hi Zhao Kai;

  Correct, in XP and earlier releases PB could only use the older "RtlGetversion" command. However, ow in W7 and higher (and since we do not support XP any longer), we could switch to using the newer "GetProductInfo" command.

  Just food for thought for Engineering!  ;-)

Regards .. Chris
Zhao Kai @Appeon 27 November, 2019
Hi Chris,

Thanks for the suggestion! It seems GetProductInfo not work on Windows XP.

Chris Pollach @Appeon 27 November, 2019
Hi Zhao Kai;

  Thank you for that list of OS Major / Minor return values.

  Looks like the PBVM is using the "RtlGetversion" API to get these. The return values of this MS-Windows command match what you attached in your document. The granularity is the same (which is not very accurate).

  Suggestion: change the PBVM code to use the "GetProductInfo" API instead to get more accurate O/S version information.

Regards ... Chris
Zhao Kai @Appeon 26 November, 2019
OS version
Zhao Kai @Appeon 26 November, 2019
Hi Prashant/Chris,

Thanks for reporting the issue, we will keep updating and improving the PB Help documentation.

Please refer to the attached document on OS and OSMajorRevision/OSMinorRevision mapping.

Chris Pollach @Appeon 26 November, 2019
 I will now transfer this ticket though over to the main Support / Engineering Team to see if they know of the current return values for the O/S versions to mentioned.
Chris Pollach @Appeon 26 November, 2019
Hi Prashant;

  Yes, the PB Help documentation only covers up to W2008 (return value 6). 

  I have created a new ticket #3692 today to revise the Environment object classes documentation for the "OSMajorRevision" and "OSMinorRevision" property description & return values for each O/S version. I also requested to cover W2019 server as well as this version is now GA.

Regards ... Chris
Prashant Mungase 26 November, 2019
What will be the output for the 
 - Windows 7
 - Windows 8
 - Windows 10
 - Windows server 2008
 - Windows server 2008 R2
 - Windows server 2012 R2
 - Windows server 2012 
 - Windows server 2016
Chris Pollach @Appeon 21 November, 2019
Hi Prashant;

   Actually, PB2017 / PB2019 report the O/S versions correctly. Originally, Sybase had a bug in their Major Version reporting of this value plus, PB 11.x existed before W10. Upon Appeon taking over the PB IDE code from SAP (PB 12.6) in 2016, Appeon fixed this issue and also made Appeon PB W10 compliant (which it was not before).

Regards ... Chris
Prashant Mungase 21 November, 2019

*Reproduce Steps:

environment     env
String            ls_version
ls_version = "Os version "+ String(env.osmajorrevision)

Remarks: Above mentioned code is giving 2 different values for the windows 10 , in powerbuilder 17 it is giving value 10 and in powerbuilder 11.5 it is giving 6. What will be the values in case of windows server?
Windows 10
Database Type:
SAP SQL Anywhere
Database Version: