Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: How to identify that the OS is Windows 10 S?


This question is answered.


Permlink Replies: 4 - Last Post: Sep 27, 2017 12:14 AM Last Post By: Ede Csanádi
Ede Csanádi

Posts: 40
Registered: 10/9/06
How to identify that the OS is Windows 10 S?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 26, 2017 8:34 PM
Hi!

How to detect that the app. is running on Windows 10 S?

Seems like the issue is new, Google search does not show any specifics.

Any ideas?

Best regards
3delite
Lajos Juhasz

Posts: 801
Registered: 3/14/14
Re: How to identify that the OS is Windows 10 S?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 26, 2017 10:37 PM   in response to: Ede Csanádi in response to: Ede Csanádi
Ede Csanádi wrote:

Hi!

How to detect that the app. is running on Windows 10 S?

Seems like the issue is new, Google search does not show any
specifics.

Any ideas?

This is not really a new issue or it's different on win 64 (it's a bit
strange to ask this kind of question here)? A more detailed anser you
can find at:
https://stackoverflow.com/questions/32115255/c-how-to-detect-windows-10.
Ede Csanádi

Posts: 40
Registered: 10/9/06
Re: How to identify that the OS is Windows 10 S?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 26, 2017 10:44 PM   in response to: Lajos Juhasz in response to: Lajos Juhasz
Thank you very much for your reply!

I already found this link, but I need to know whether it's an S version.
Dave Nottage

Posts: 1,850
Registered: 1/7/00
Re: How to identify that the OS is Windows 10 S?
Correct
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 26, 2017 11:03 PM   in response to: Ede Csanádi in response to: Ede Csanádi
How to detect that the app. is running on Windows 10 S?

Looks like this could be it:

https://msdn.microsoft.com/en-us/library/windows/desktop/ms724358(v=vs.85).aspx

--
Dave Nottage [TeamB]
Find hints tips and tricks at Delphi Worlds blog: http://www.delphiworlds.com
Ede Csanádi

Posts: 40
Registered: 10/9/06
Re: How to identify that the OS is Windows 10 S?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 27, 2017 12:14 AM   in response to: Dave Nottage in response to: Dave Nottage
Dave Nottage wrote:
How to detect that the app. is running on Windows 10 S?

Looks like this could be it:

https://msdn.microsoft.com/en-us/library/windows/desktop/ms724358(v=vs.85).aspx

--
Dave Nottage [TeamB]
Find hints tips and tricks at Delphi Worlds blog: http://www.delphiworlds.com

That seems working. I could not test on a Windows 10 S but the following code does report True on Windows 10 Home when tested against PRODUCT_CORE:

function GetProductInfo(dwOSMajorVersion, dwOSMinorVersion, dwSpMajorVersion, dwSpMinorVersion: DWORD; out pdwReturnedProductType: DWORD): BOOL stdcall; external kernel32 delayed;
 
function TFormMain.RunningOnWindows10S: Boolean;
const
    PRODUCT_CLOUD = $000000B2;  //* Windows 10 S
    PRODUCT_CLOUDN = $000000B3; //* Windows 10 S N
    PRODUCT_CORE = $00000065;   //* Windows 10 Home
var
    pdwReturnedProductType: DWORD;
begin
    Result := False;
    if GetProductInfo(10, 10, 0, 0, pdwReturnedProductType) then begin
        Result := (pdwReturnedProductType = PRODUCT_CLOUD) OR (pdwReturnedProductType = PRODUCT_CLOUDN);
    end;
end;


Thank you very much for helping!
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02