Older Newer
Fri, 10 Dec 2021 03:06:26 . . . . SyneRyder [Update with future support for Win 7 - 11 detection]


Changes by last author:

Added:
= getWindowsVersion =

== Syntax ==

int getWindowsVersion()

== Return ==

Returns an integer code representing the Windows version - see example below.

Windows 7 - 11 detection is only available in FilterMeister 1.0.9h (Dec 2021) and newer.

== Description ==

Detects the Windows version the host graphics application thinks it is running on. This could differ from the version of Windows that the user actually has if the host application is running in a compatibility mode, or if the application does not have the appropriate manifest for the newer Windows version.

== Example ==

<code>

%fml

ForEveryTile:{

int n = getWindowsVersion();

switch (n) {

default:

case 0:

strcpy (str0, "Unknown");

break;

case 16:

// Requires FM 1.0.9h

strcpy (str0, "Windows 11");

break;

case 15:

// Requires FM 1.0.9h

strcpy (str0, "Windows 10");

break;

case 14:

// Requires FM 1.0.9h

strcpy (str0, "Windows 8.1");

break;

case 13:

// Requires FM 1.0.9h

strcpy (str0, "Windows 8");

break;

case 12:

// Requires FM 1.0.9h

strcpy (str0, "Windows 7");

break;

case 11:

strcpy (str0, "Windows Vista");

break;

case 10:

strcpy (str0, "Windows 2003");

break;

case 9:

strcpy (str0, "Windows XP");

break;

case 8:

strcpy (str0, "Windows 2000");

break;

case 7:

strcpy (str0, "Windows NT");

break;

case 6:

strcpy (str0, "Windows ME");

break;

case 5:

strcpy (str0, "Windows 98 SE");

break;

case 4:

strcpy (str0, "Windows 98");

break;

case 3:

strcpy (str0, "Windows 95 OSR2");

break;

case 2:

strcpy (str0, "Windows 95");

break;

case 1:

strcpy (str0, "Win32s");

break;

}

Info ("You are running %s", str0 );

return true;

}

</code>

== See Also ==

getDisplaySettings