OverviewExamples
table System.GetOSVersionInfo ( |
) |
OS_info = System.GetOSVersionInfo();
Get's the version information of the OS the user is running and stores it's results in a table called "OS_info." If you wanted the major version number, you could access it by referencing OS_info.MajorVersion.
-- Get the current OS Version information
tVersionInfo = System.GetOSVersionInfo();
-- Combine Version information into a file-version string
sCurrentWindowsVersion = tVersionInfo.MajorVersion .. "." .. tVersionInfo.MinorVersion.. "." .. tVersionInfo.BuildNumber;
-- Specify the minimum required file version
sRequiredWindowsVersion = "5.1.2600";
-- Compare the current file version to the minimum requirement
nCompareResult = String.CompareFileVersions (sRequiredWindowsVersion, sCurrentWindowsVersion);
-- If the minimum requirement is greater than the current version, display an error and exit.
if (nCompareResult == 1) then
Dialog.Message("Error", "Windows XP or later is required to use this software.", MB_OK, MB_ICONSTOP, MB_DEFBUTTON1);
Application.Exit();
end
Gets the Operating System's version information, and compares it to a minimum value. If the installed operating system is not Windows XP or later (version 5.1.2600 or newer), an error message is displayed.
See also: Related Actions