toasterking2
12/4/2017 - 4:02 PM

Windows workstation or server

Relevance to identify whether a Windows OS is a member of the Windows workstation or Windows server family.

/* Returns "Workstation" for member of Windows 9x/NT workstation family, "Server" for member of Windows NT Server family, or "Unknown - [osname]" for other OS. */
if (name of operating system as lowercase starts with "win") then (if (name of operating system = "Win95" OR name of operating system = "Win98" or name of operating system = "WinME") then "Workstation" else (if (value "ProductType" of key "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ProductOptions" of registry = "WinNT") then "Workstation" else "Server")) else "Unknown - " & name of operating system

/* Returns true if OS is member of Windows Win9x/NT workstation family */
(name of operating system as lowercase starts with "win") and ((name of operating system = "Win95" OR name of operating system = "Win98" or name of operating system = "WinME") or (value "ProductType" of key "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ProductOptions" of registry = "WinNT"))

/* Returns true if OS is member of Windows NT workstation family */
(name of operating system as lowercase starts with "win") and (value "ProductType" of key "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ProductOptions" of registry = "WinNT")