here's a couple of functions and call examples to test for Vista RTM
(if is beta or rc release then - application exit)
tweak to suit - test code examples only.
note: the System.GetOSVersionInfo(); method should be sufficient
however to really nail it the File.GetVersionInfo(_SystemFolder.."\\ntdll.dll");
method is recommened.
hth a little
(if is beta or rc release then - application exit)
tweak to suit - test code examples only.
Code:
function IsVista_Legit() local tOsVer = System.GetOSVersionInfo(); if tOsVer then Dialog.Message("function - internal debug info", tOsVer.BuildNumber); --delete if ((tOsVer.MajorVersion == "6") and (tOsVer.BuildNumber >= "6000")) then return true; --confirmed Vista RTM or later end end return false; --wrong version(or could not get OSVersionInfo) end --an OsVersionInfo method - test call for Vista RTM only if (not IsVista_Legit()) then Dialog.Message("Notice", "Wrong version or no OSVersionInfo"); Application.Exit(); else Dialog.Message("Notice", "Confirmed Vista (RTM) or Later"); end function GetKernalInfo(sVer) local tOsKernal = File.GetVersionInfo(_SystemFolder.."\\ntdll.dll"); if tOsKernal and sVer then Dialog.Message("function - internal debug info", tOsKernal.FileVersion); --delete if (tOsKernal.FileVersion >= sVer) then return true;--confirmed Vista RTM or later end end return false; --wrong version(or could not GetVersionInfo) end --an Os Kernal Version method - test call for Vista RTM only ! if (not GetKernalInfo("6.0.6000.16386")) then Dialog.Message("Notice", "Wrong version or no VersionInfo"); Application.Exit(); else Dialog.Message("Notice", "Confirmed Minimum Version or Later"); end
however to really nail it the File.GetVersionInfo(_SystemFolder.."\\ntdll.dll");
method is recommened.
hth a little
Comment