cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Not applicable

How to detect Server Core?

Does anyone know of an appropriate way to differentiate between Windows 2008 Server and 2008 Server Core via installscript? I want to do some custom, specialized actions for Server Core but am unsure how to detect if the installer is running on it. Any help would be greatly appreciated.
Labels (1)
0 Kudos
(3) Replies
RobertDickau
Flexera Alumni

I haven't tried it, but apparently there's a GetProductInfo API function (from kernel32.dll) that you can call on a Server 2008 system to identify different flavors of it. MSDN has more information...
0 Kudos
Not applicable

So I assume that means I would have to write an external DLL to do it? Either that or maybe a hack job of looking for some file or registry key the exists (or doesn't exist) on Server Core?
0 Kudos
RobertDickau
Flexera Alumni

I haven't tried that function in particular, but you can often call Windows API functions directly from InstallScript without creating an external DLL. For the general idea---since Windows API functions are in fact DLL functions---please see the help topic "Calling a .dll File Function".
0 Kudos