Using either the registry or the file system. The reason for the restriction is that I am doing this as an MSI conditional statement.
Cheers!
Using either the registry or the file system. The reason for the restriction is that I am doing this as an MSI conditional statement.
Cheers!
under registry key
HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion
look for key pair:
CurrentVersion = Microsoft Windows NT 5.1.2600 Service Pack 3
You should find enough information to determine the OS service pack (in the worst case you can always use the build string) in the following registry key:
HKLM\Software\Microsoft\Windows NT\CurrentVersion
If you're using an MSI, you should be able to use the VersionNT and ServicePackLevel properties right in the conditional statement.
eg. The following code checks for Windows XP sp3 or greater:
VersionNT=501 And ServicePackLevel>2
You can also check the WindowsBuild property if you also need the build number.
The VerifyVersionInfo function should allow you to check the version of Windows being run meets your application's requirements, without the pitfalls that can occur with checking for an exact version with GetVersionEx (such as breaking on major version changes - your application will most likely run on Vista, and Windows 7, and future versions not yet developed).
"Run" (Windows key + r or start/run) msinfo32 or sysdm.cpl