MSI Factory 2.3

System.GetOSVersionInfo

System.GetOSVersionInfo

This is the first topic This is the last topic  

System.GetOSVersionInfo

This is the first topic This is the last topic  

OverviewExamples

table System.GetOSVersionInfo (

)

Example 1

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.

Example 2

-- 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 = "4.10.2222A";

 

-- 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 98 Second Edition or newer is required to use this software.", MB_OK, MB_ICONSTOP, MB_DEFBUTTON1);

   Application.ExitScript();

end

Gets the Operating System's version information, and compares it to a minimum value.  If the installed operating system is not Windows 98 Second Edition or newer (version 4.10.2222A or newer), an error message is displayed.

See also: Related Actions


Learn More: Indigo Rose Software - MSI Factory - Buy Now - Contact Us