5

Is there a way to know if the user is using Windows 10 S? Typically one would use the user-agent string to detect operating system and browser, but I do not believe that Edge on Windows 10 S will have a user-agent string any different from Edge on Windows 10 Home or Pro.

Is there any other way to programmatically detect Windows 10 S from within the browser?

X. Liu
  • 1,070
  • 11
  • 30
Scott
  • 51
  • 2
  • 1
    why do you want to know? – Patrick Aug 06 '17 at 06:00
  • I don't know why the original asker needed to know, but we need to identify Windows 10S devices for policy enforcement. – DylanSp Mar 19 '18 at 19:23
  • @DylanSp Such an 'enforcement' will _never_ be foolproof. But feel free to try out [this user agent string based approach](https://stackoverflow.com/questions/48920222/detect-windows-10-s-from-the-browser). – Ruud Helderman Mar 19 '18 at 19:51
  • @RuudHelderman Already tried that; we haven't observed any difference with that command between 10 and 10S. – DylanSp Mar 19 '18 at 19:52
  • @DylanSp Is this a classroom or office environment, where you have _some_ amount of control over _all_ client devices that are allowed to access the web application? Or should it be open to _any_ Win10S client, anywhere on earth? – Ruud Helderman Mar 19 '18 at 20:36
  • @RuudHelderman Any Win 10S client; it should work in BYOD environments. – DylanSp Mar 19 '18 at 21:21
  • You cannot do this reliably if the user does not want to report this information (although the default user agent string reflects that is windows 10, it can change) and without interfering the client with an additional program, this is by design. – Leberecht Reinhold Mar 26 '18 at 08:42

1 Answers1

1

To detect the operating system on the client machine, your script can analyze the value of two things:

  1. navigator.appVersion
  2. navigator.userAgent

As we can see in Microsoft document that released on 12/15/2016 (User-agent string changes for Microsoft Edge), the Windows NT token's value changes from 6.3 to 10.0 in the EdgeHTML engine and after that Windows 10 S was released on May 2, 2017 that Microsoft didn't mention any changes in navigator.userAgent or navigator.appVersion.

So, Edge on Windows 10 S is no different than Edge on Windows 10 Home or Pro in both of two things above.

Another things that I should to say is:

userAgent is not reliable.

New browsers may start using the same UA, or part of it, as an older browser: you really have no guarantee that the browser agent is indeed the one advertised by this property. (more information)

Ali Soltani
  • 9,589
  • 5
  • 30
  • 55