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
#10
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 @Appeon 29 November, 2019
#9
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
#8
Hi Chris,

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

Regards,
ZhaoKai
Chris Pollach @Appeon 27 November, 2019
#7
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
#6
OS version
Zhao Kai @Appeon 26 November, 2019
#5
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 @Appeon 26 November, 2019
#4
 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
#3
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
#2
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
#1
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
#0
*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