Solved

Detecting OS

Posted on 1998-12-12
5
199 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

730 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