When the IsOS function is given OS_SERVERADMINUI as its dwOS argument, it answers according to the following registry value:

Key HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced
Value ServerAdminUI

Version 6.1 and higher return TRUE or FALSE according to whether the value has non-zero data of the expected type. Before then, the function accepts any data of any type, up to and including 4 bytes (reading into a zeroed buffer), and returns the data (and thus not necessarily TRUE or FALSE).

The ServerAdminUI Registry Value

A thorough explanation of this registry value is presently beyond the scope of this article, but a write-up is planned for this site’s section on tips and tweaks. A brief summary is offered meanwhile.

The ServerAdminUI value is prepared by EXPLORER.EXE to record that the user is likely to work more closely with the operating system than is typical and may prefer a user interface that tries less to be friendly—indeed, that this user may regard the standard behaviour not as friendly but as intrusive, irritating and even highly unwelcome. EXPLORER itself calculates this value when first run (per-user), or if the value has been deleted. EXPLORER sets the value as a DWORD to 1 or 0, mostly according to whether the operating system is a server edition and the user has sufficient privilege. The only action that EXPLORER itself takes in response to the calculation is to make it the default that Administrative Tools be shown on the Start Menu. The ServerAdminUI registry value is EXPLORER’s record of the calculation so that other modules, most notably SHELL32, can know to change their defaults away from such things as hiding filename extensions and preferring Large Icons to Details.

For a demonstration of the feature, start Windows Server 2003 and create two new test accounts. Make one an administrator and leave the other as an ordinary user. Log on to each in turn, and see that they are given different initial settings in the Folder Options.


The OS_SERVERADMINUI case of the SHLWAPI function IsOS is supported in version 6.0 from Windows XP SP2, and higher.