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


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.
 
Ad

Advertisements

M

Mark-Allen Perry

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top