Search code examples
c#.netuwpwindows-10desktop-bridge

How to detect Windows 10 S?


Windows 10 S is a special Windows edition which is streamlined for security and superior performance. Basically you can only install apps from Microsoft Store.

You can deliver normal desktop apps through desktop bridge to the Store so that itself is not a big problem. However Windows 10 S imposes additional limitations on Store apps, which might cause them to crash during startup.

I have received this feedback from Store Application Review Results.

App Policies: 10.1.2.1 Inaccurate Functionality: Windows 10S

Notes To Developer:

Your app doesn't work on Windows 10 S and the application terminates without notice to the user. Apps that don’t work on Windows 10 S must support graceful shutdown.

Steps to reproduce: 1. Launch the app on Windows 10S. 2. Notice that your app doesn't work on Windows 10 S and the application terminates without notice to the user.

Please be sure to test your app for Windows 10 S: https://learn.microsoft.com/windows/uwp/porting/desktop-to-uwp-test-windows-s Tested Devices: Windows 10 Desktop

So basically what I need to do is to detect Windows 10 S and notify the user that it's not supported.


Solution

  • Use GetProductInfo Win32 API call and check for return value PRODUCT_CLOUD (0x000000B2) and PRODUCT_CLOUDN (0x000000B3). That 2 values are the SKU detection codes for Windows 10 S.