How to determine if a machine is running a Windows server?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi, I am writing an application that needs to determine if the machine is
running on is a Windows Server. I am using the API function NetServerGetInfo
with level 101 and looking for at least one of this flags to be present in
the sv101_type field:
- SV_TYPE_DOMAIN_CTRL, SV_TYPE_DOMAIN_BAKCTRL, SV_TYPE_SERVER_NT.

This is working generally but I have a w2k Server with Terminal server where
none of this flags is present. However, the SV_TYPE_TERMINALSERVER flag is
present. Must I consider this flag enough for determining that a machine is
running a windows server? Can this flag be present in a Windows workstation?

I have searched in the MSDN but I have not found further information about
this flags...Can anybody help me with this?

Thanks.
 
It will NOT be found on a workstation type machine. Only servers have the ability to run Terminal Services.

--

Always try the MS KB first before posting.
MS KB: http://support.microsoft.com/default.aspx?scid=fh;EN-US;KBHOWTO
And the answer could have already been posted, so try searching this and other newsgroups first.
----
Mark-Allen Perry
ALPHA Systems
Marly, Switzerland
mark-allen_AT_mvps_DOT_org

Hi, I am writing an application that needs to determine if the machine is
running on is a Windows Server. I am using the API function NetServerGetInfo
with level 101 and looking for at least one of this flags to be present in
the sv101_type field:
- SV_TYPE_DOMAIN_CTRL, SV_TYPE_DOMAIN_BAKCTRL, SV_TYPE_SERVER_NT.

This is working generally but I have a w2k Server with Terminal server where
none of this flags is present. However, the SV_TYPE_TERMINALSERVER flag is
present. Must I consider this flag enough for determining that a machine is
running a windows server? Can this flag be present in a Windows workstation?

I have searched in the MSDN but I have not found further information about
this flags...Can anybody help me with this?

Thanks.
 
Back
Top