Questions? Feedback?powered byOlark live chat software
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 Publishing: Public
Status: Transferring Priority: P3
Classification: Enhancement Resolution:
Zhao Kai 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.

Regards,
ZhaoKai
Chris Pollach 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 27 November, 2019
Hi Chris,

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

Regards,
ZhaoKai
Chris Pollach 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 26 November, 2019
OS version
Zhao Kai 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.

Regards,
ZhaoKai
Chris Pollach 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 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 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).

HTH
Regards ... Chris
Prashant Mungase 21 November, 2019
*Phenomenon:



*Reproduce Steps:


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


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?
OS:
Windows 10 
Platform:
64-bit 
Database Type:
SAP SQL Anywhere 
Database Version:
V16.0.0