Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to tell is script is running on server

Status
Not open for further replies.

conan3

MIS
May 6, 2003
65
US
Our local programmer has a tool that loads software, registry fixes, and microsoft bug killers. He asked me if there was a registry key he could check to see if it's a server or workstation.

He want's to check if it's a server or workstation via a registry key..

Any Ideas or should he just use the OS Desription field..

David
 
You may want to consider using WMI to determine this but, barring that, here is the reg key:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ProductOptions\ProductType

If it is = "WinNT" then you are running workstation/professional

If it is anything else then you are running server.

XP Home may have a different value as well.

HtH,

Rob
robschultz@yahoo.com
-Focus on the solution to the problem, not the obstacles in the way.-
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top