Solved

Detecting OS

Posted on 1998-12-12
5
195 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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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…

746 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now