EricMyers
(Just in Town)
2018-02-14 07:44 AM
Win10 OS is not reporting as expected

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


Mart
(KiX Supporter)
2018-02-14 09:41 AM
Re: Win10 OS is not reporting as expected

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


Arend_
(MM club member)
2018-02-14 09:54 AM
Re: Win10 OS is not reporting as expected

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.


syntax53
(Fresh Scripter)
2018-08-23 05:39 PM
Re: Win10 OS is not reporting as expected

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.