getOperatingSystemType() returns wrong OS type with some DAW

I'm on Windows 10, and the OS index returned by the function getOperatingSystemType() differs depending on the DAW !

On Studio One, it says Windows 10 but when I launch the plugin on Reaper it says Windows 8.

How's that possible?

Any idea how to solve it?

By the way, I'm using the latest Juce SDK.


Windows itself contains some horrible, horrible hacks to make sure that old applications keep working correctly on newer OSes. One of those is probably that if the OS thinks a program isn't Windows-10 aware, it will lie to it about the OS version.

So I'm afraid it's down to the host to make this work! I don't think there's anything we could do in JUCE that would change this. (And even if there is a special Windows function to tell the OS that we're to be trusted with the truth, calling it would probably mess up the host in some unpredictable way, so it'd be best avoided)

Here is the official Microsoft documentation for the version number hack jules mentioned:

Basically, if you want the Windows version to be reported correctly on Win8.1 and Win10, you need to put an extra thing in the app manifest saying that your app supports Win8.1 and Win10.

However an audio plug-in cannot do that as it is merely a DLL loaded in a host. So to fix this, the host (Reaper in your case) needs to have that app manifest thingy added. Nothing we can do about that! 

Thank for you for these answers.
(it’s never too late!)