Page 1 of 1 1
Topic Options
#213202 - 2018-02-14 07:44 AM Win10 OS is not reporting as expected
EricMyers Offline
Just in Town

Registered: 2018-02-14
Posts: 1
Loc: Connecticut, USA
I currently use a lookup csv file to cross-reference @PRODUCTTYPE to a more compact OSVersion we use for other purposes. However, in a new build of Windows 10, I noticed that we're no longer getting the expected result for @PRODUCTTYPE. According to the 4.67 documentation, Windows 10 OS should be reported as:
Windows 10 Home N
Windows 10 Pro N
Windows 10 Enterprise N
Windows 10 Home
Windows 10 Pro
Windows 10 Enterprise

My code is:
 Code:
  If Exist($LookUpFile)
    ;Load Lookup file into array and then filter array with only rcds with @ProductType+$Delim1
    $RcdArr=FilterArray(LoadArrFromFile($LookUpFile),Trim(@PRODUCTTYPE)+$Delim1)
    ;If we found a match
    If UBound($RcdArr) > -1
      ;Get $OS from 2nd field in first record that matches - Should only be one rcd
      $OS=Split($RcdArr[0],",")[1]

What I'm receiving back in my @PRODUCTTYPE is:
Windows 10.0 / 125

Since I can't find that OS in the lookup file, we're not getting a correct translation. Is there something that the newer versions of Win10 have that the 4.67 version of KiXtart doesn't interpret?

Thanks in advance!

EricM


Edited by Mart (2018-02-14 09:33 AM)
Edit Reason: Please use code tags when posting code.

Top
#213204 - 2018-02-14 09:41 AM Re: Win10 OS is not reporting as expected [Re: EricMyers]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
Hmmmm..... when I check @PRODUCTTYPE on my system (Windows 10 Enterprise v1703) I get "Windows 10 Enterprise" as expected. Not sure what goes wrong in your situation.
Are you sure you are on Kix 4.67?

What do you see when you run this code? Just checking the contents of @PRODUCTTYPE without doing anything with it is the first this I would do to find out what is happening.

 Code:
?@kix
?@PRODUCTTYPE
sleep 5
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#213205 - 2018-02-14 09:54 AM Re: Win10 OS is not reporting as expected [Re: Mart]
Arend_ Moderator Offline
MM club member
*****

Registered: 2005-01-17
Posts: 1895
Loc: Hilversum, The Netherlands
Or use this:
 Code:
$ProductType = ReadValue("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion","ProductName")
? $ProductType

Or if you are only looking which type of Windows you are using you can use this:
 Code:
$ProductType = ReadValue("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion","EditionID")
? $ProductType


Over the years personally I have found @PRODUCTTYPE to be unreliable at best.
The code had to be adjusted in Kix itself by Ruud with each new Windows release.

Top
#213570 - 2018-08-23 05:39 PM Re: Win10 OS is not reporting as expected [Re: Arend_]
syntax53 Offline
Fresh Scripter

Registered: 2004-11-17
Posts: 33
Loc: Pennsylvania
I am also experiencing this with a Windows 10 Enterprise PC. @PRODUCTTYPE reports "Windows 10.0 / 125". EditionID is "EnterpriseS" and ProductName name is "Windows 10 Enterprise 2016 LTSB". This is a PC from an outside contractor.
Top
Page 1 of 1 1


Moderator:  Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 366 anonymous users online.
Newest Members
Timothy, Jojo67, MaikSimon, kvn317, kixtarts2025
17874 Registered Users

Generated in 0.087 seconds in which 0.044 seconds were spent on a total of 14 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org