I've seen the plug-in ('Version plug-in') that will return the OS name ('IsWindowsXP', for example) + some more detailed info through 'GetWindowsVersion', but my NSIS install script needs to check for:
If Windows XP, is SP2 installed (or greater)?
If Windows 2000, is Service Pack 4 Update Rollup 1 (or greater)?
Is there an actual build/version no. I can check from the registry?
Easy way to detect Windows version/SP Level?
3 posts
You can call directly the GetVersionEx API function to get the actual version of windows (in case you do not want to use the plugin). On NT machines you get service pack info at the szCSDVersion
member of the OSVERSIONINFO structure (it returns "miscellaneous information" on 9x machines). If you use the OSVERSIONINFOEX structure then look also for wServicePackMajor and wServicePackMinor
CF
member of the OSVERSIONINFO structure (it returns "miscellaneous information" on 9x machines). If you use the OSVERSIONINFOEX structure then look also for wServicePackMajor and wServicePackMinor
CF
Or better, use a plugin that implements this for you 🙂
-Stu
-Stu