1. Pauline Aubertin
  2. PowerBuilder
  3. Monday, 12 March 2018 14:48 PM UTC

Hi,

Our environment is Win 7 32 and 64 bit, and Win 10 (64 bit).

We build our application in PB2017 R2/EBF01 on Win 7 for both 32 and 64 bit platforms.  We can detect whether it is running in 32 or 64 bit but we also need to detect if we are running on Win 10.

We currently check the Environment object ostype for an enumerated data type of WindowsNT! for an OsMinorRevision of Windows 7.

How is Win 10 detected?  Is Win 10 considered a major or minor revision and if so, is there a new value for it or is there a new enumerated data type for it?

Thanks in advance!

Pauline

Armeen Mazda @Appeon Accepted Answer Pending Moderation
  1. Thursday, 15 March 2018 03:52 AM UTC
  2. PowerBuilder
  3. # 1

The environment object is being corrected in the next MR of PB 2017 R2 to properly return the supported OS versions, like Windows 10.  If you need something immediate, please try the workarounds suggested by other Appeon community members.  Thanks.

Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Monday, 12 March 2018 15:31 PM UTC
  2. PowerBuilder
  3. # 2

Hi Pauline;

 

1) The Environment object in PB has a new property called "ProcessBitness" that will give you either a 32 or 64bit status of how your PB App is running.

2) The Environment object has not been updated yet to properly return the newer O/S versions. Instead, I use the "RtlGetversion" MS-Windows API command to retrieve the latest O/S versions.

FUNCTION uLong            RtlGetVersion ( ref sr_os_version  osver )  LIBRARY  "ntdll.dll"

HTH

Regards ... Chris

 

Comment
  1. Adele Malherbe
  2. Thursday, 26 April 2018 14:04 PM UTC
HI,



I is the values





Environment myEnvironment

GetEnvironment(ref myEnvironment)

​// OSMajorRevision = 6

​// OSMinorRevision = 2



When I use PB2017/ R2



Regards

  1. Helpful
  1. Adele Malherbe
  2. Thursday, 26 April 2018 14:04 PM UTC
HI,



I is the values





Environment myEnvironment

GetEnvironment(ref myEnvironment)

​// OSMajorRevision = 6

​// OSMinorRevision = 2



When I use PB2017/ R2



Regards

  1. Helpful
  1. Adele Malherbe
  2. Thursday, 26 April 2018 14:05 PM UTC
HI,



I is the values





Environment myEnvironment

GetEnvironment(ref myEnvironment)

​// OSMajorRevision = 6

​// OSMinorRevision = 2



When I use PB2017/ R2



Regards

  1. Helpful
There are no comments made yet.
Michael Kramer Accepted Answer Pending Moderation
  1. Monday, 12 March 2018 15:24 PM UTC
  2. PowerBuilder
  3. # 3

When I run this snippet on Win10, I gett the following OS version

Environment myEnvironment
GetEnvironment(ref myEnvironment)
​// OSMajorRevision = 6
​// OSMinorRevision = 2

 

Also, TopWizProgramming.com has a free code example for OSVersion.

HTH /Michael

Comment
  1. Michael Kramer
  2. Monday, 12 March 2018 15:43 PM UTC
... and running TopWiz's OSVersion app I see



OS: Windows 10

Edition: Professional

Bitness: 64

CSD: Fall Creator's Update (1709)



Setting a breakpoint in the code I see this version number (16299: Fall Creator's Update) :: Version = 10.0.16299.15



/Michael

  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.