PDA

View Full Version : Identify Windows NT Sever / Workstation



McDoa
01-25-2001, 02:02 PM
How can i idenfity a Windows NT 4.0 Sever or Workstation in my logon-script?

Rocker6
01-28-2001, 12:16 AM
You can do an "IF EXIST" line, and look for a file that is only on a workstation, or visa versa. A good example of this is usrmgr for a server and musrmgr for a workstation.

So, if you copy the following into your file....

@echo off
IF EXIST c:\winnt\system32\musrmgr.exe goto WS
IF EXIST c:\winnt\system32\usrmgr.exe goto server
:server
rem enter server specific commands here
echo "We have a server!, executing server-specific commands."
goto common
:WS
rem enter workstation specific commands here
echo "We have a Workstation!"
goto common
:common
rem enter common and Win9x commands here


Not sure how this will work with permissions. Like, if a user can't see musrmgr.exe, it may just go to common. Try it and let me know.

---
Joseph Volence
Assistant System Administrator
jvolence@yahoo.com

broeckmj
01-29-2001, 02:32 PM
Hi to identify NT 4.0 WS or Server, check the following regkey !
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Contro l\ProductOptions","ProductType"

If ProdType = Winnt it's a Workstation
If ProdType = servernt or lanmannt it's a Server !!

The check for Wusrmgr or Musrmgr, will fail on Administrator WS, because many of them will have the usrmgr installed to administrator the domain

Rocker6
01-29-2001, 04:37 PM
Is there an easy way to check that in a login script though?

---
Joseph Volence
Assistant System Administrator
jvolence@yahoo.com

broeckmj
01-31-2001, 07:43 AM
You can check this, with a program such as Kixtart for example !

http://netnet.net/~swilson/kix/