Solved

Detecting OS

Posted on 1998-12-12
5
198 Views
Last Modified: 2010-05-03
Hiya,

     Anybody know how I can detect if I'm running on Windows NT Workstation or Windows NT Server.  I can only detect if it's Windows NT or Windows 95/Windows 98.  When it's running on Windows NT, I can't detect if it's server or Workstation  and as well, when it's on Win 95, I can't detect if it's WIn95 or Win98.. I'm using the sysinfo control.

Thanks in advance.

       palim
0
Comment
Question by:palim
  • 2
  • 2
5 Comments
 
LVL 3

Expert Comment

by:groone
ID: 1449660
The only difference between NT workstation and NT server is the administration programs of NT Server so the easiest way to check would be for your program to maybe do a search of a specific admin program or dll that would not be in workstation but would be in server with a general setup and no pack added.  Maybe do a search for dhcpadmn.exe or user.exe.  I believe either of these would work for you.
0
 

Author Comment

by:palim
ID: 1449661
Are these software installable to the workstation if lets say I have remote admin installed on the workstation?  I'm looking for something that's maybe set in the registry or something that the O/S has registered, that I can get using an API call.
0
 
LVL 13

Expert Comment

by:Mirkwood
ID: 1449662
15 points means that this question is super, super easy.
Increase points to 100 and I will give you the answer.
0
 

Author Comment

by:palim
ID: 1449663
Well... it may be easy to some but not to others you see... :)  How 'bout 50?
0
 
LVL 13

Accepted Solution

by:
Mirkwood earned 10 total points
ID: 1449664
In order to distinguish between Windows NT Workstation and Windows NT Server, use the registry API to query the following:


   \HKEY_LOCAL_MACHINE\SYSTEM
   \CurrentControlSet
   \Control
   \ProductOptions

The result will be one of the following:

   WINNT      Windows NT Workstation is running.
   SERVERNT   Windows NT Server (3.5 or later) is running.
   LANMANNT   Windows NT Advanced Server (3.1) is running.

0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question