Run Logon Script on Workstations Only



I am creating a script that I want to run at logon in a Windows NT
domain, but want it to execute on Windows 2000 or XP Professional
Workstations only, not on Servers. We have several admins that use the
same username to log on to both their workstations, and servers,
creating issues if the same script executes when they log on to their
servers.

While I am able to use the System environment variable to determine
that the OS is Windows_NT, and use a subsequent registry read of
HKLM\Software\Windows NT\CurrentControlSet\CurrentControlSet to
determine the OS version as 5.0 or 5.1. This doesn't tell me whether
the machine is XP/2000 professional, or server 2000/2003.

This sounds real easy, but I have been researching this, and, as of
yet, have been unable to locate an efficient way to tell whether the
local machine is a workstation or server. Do you have any suggestions
that will work in a large environment (10000 + workstations and
servers)?

.



Relevant Pages