I'm running WHS v5.2 build 3790.srv03_sp2_gdr.100216-1301 : Service Pack 2.
I think you need to check one more bit. The example you linked to
previously doesn't check the "suite name".
I jammed the folowing code into a dll, and I call that, and it works
correctly between 2003 and WHS.
bool declspec (all that jazz for an external DLL header)
IsWindowsHomeServer()
{
/*****
IsWindowsHomeServer
Returns whether or not we're running on Windows Home Server.
Determining
that requires we check the "suite name" - this will distinguish it from
Windows 2003,
which has the same major and minor versions.
*****/
bool bIsWindowsHomeServer = false;
OSVERSIONINFOEX osvi;
DWORDLONG dwlConditionMask = 0;
// Initialize the OSVERSIONINFOEX structure.
ZeroMemory(&osvi, sizeof(OSVERSIONINFOEX));
osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
osvi.dwMajorVersion = 5;
osvi.dwMinorVersion = 2;
osvi.wSuiteMask = VER_SUITE_WH_SERVER;
// Initialize the condition mask.
VER_SET_CONDITION( dwlConditionMask, VER_MAJORVERSION, VER_AND );
VER_SET_CONDITION( dwlConditionMask, VER_MINORVERSION, VER_AND );
VER_SET_CONDITION( dwlConditionMask, VER_SUITENAME, VER_AND );
// Perform the test.
BOOL result = VerifyVersionInfo(&osvi,
VER_MAJORVERSION | VER_MINORVERSION | VER_SUITENAME,
dwlConditionMask );
if (result)
{
bIsWindowsHomeServer = true;
}
else
{
DWORD error = GetLastError();
if (error == ERROR_OLD_WIN_VERSION)
{
// LOG_DEBUG("IsWindowsHomeServer - not running on
Windows Home
Server.\n");
}
else
{
// LOG_DEBUG("IsWindowsHomeServer - VerifyVersionInfo
failed (error
%ld).\n", error);
}
}
return (bIsWindowsHomeServer);
}
Greg
--
View this message in context:
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Re-PropertyRef-WIX-SUITE-WH-SERVER-tp4958608p4965687.html
Sent from the wix-users mailing list archive at Nabble.com.
------------------------------------------------------------------------------
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users