1

I am having a Windows 10 Enterprise Evaluation VM and when I navigated the registry to find the Product name under Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion ProductName, I found it was Windows 10 Enterprise Evaluation.

I used innosetup function to print the product name in my code using the below function.

RegQueryStringValue(HKLM64, 'SOFTWARE\Microsoft\Windows NT\CurrentVersion', 'ProductName', strProductName)

where strProductName is a String variable I used in the function, but it prints Windows 8 Pro.

Any idea as to what was the problem.

Thanks in Advance.

DeeJay007
  • 469
  • 4
  • 30
  • 4
    Windows lies to you about the actual version. See [this Q&A](https://stackoverflow.com/questions/38102565/how-can-a-vb-6-app-determine-if-it-is-running-on-windows-10) discussing the problem in relation to VB 6. The problem is similar, no matter which language you're using, since you're calling the same OS API. You either need a manifest that marks your app (in this case, installer) as Win 10-compatible, or you need to call a lower-level API that doesn't have the compatibility shims applied. Do reconsider whether you really need to know which version of the OS. Detect *features*, not versions. – Cody Gray - on strike Oct 27 '17 at 12:48
  • A detailed response in the post you have shared. Thanks a ton @Cody. – DeeJay007 Oct 27 '17 at 13:15
  • What version of Inno Setup are you using? Make sure you are using the latest one. – Martin Prikryl Oct 29 '17 at 17:49
  • Yes, I am using the latest 5.5.9 version. – DeeJay007 Nov 01 '17 at 08:43

0 Answers0