views:

195

answers:

2

My employer is considering releasing two versions of the same Windows Server-based product; a cheaper "small business" edition and a more expensive "enterprise" edition.

There will be a number of differences between the editions, but ideally we'd like to restrict the "small business" edition to only install on Microsoft Small Business Server (SBS) 2000 or the newer Windows SBS 2003 and 2008.

Is there a reliable way to detect (via an API call or the Registry, for example) whether or not the operating system is one of those SBS products?

+1  A: 

Here's an MSDN article describing probing the operating system version, including whether the system is a small business product( PRODUCT_SMALLBUSINESS_SERVER enumeration ).

macbirdie
+1  A: 

I guess GetVersionEx(), which returns OSVERSIONINFOEX will do:'

  • VER_SUITE_SMALLBUSINESS : Microsoft Small Business Server was once installed on the system, but may have been upgraded to another version of Windows. Refer to the Remarks section for more information about this bit flag.

  • VER_SUITE_SMALLBUSINESS_RESTRICTED : Microsoft Small Business Server is installed with the restrictive client license in force. Refer to the Remarks section for more information about this bit flag.

Anton Gogolev