The following registry keys can be used to detect the operating system version installed.
HKLM\Software\Microsoft\Windows NT\CurrentVersion\CurrentVersion
5.1 = Windows XP
5.2 - Server 2003 SP2
6.0 - Server 2008
6.1 - Server 2008 R2 & Windows 7 SP1
Note : The ProductName value in the same location gives the full product description though this can be to detailed to be of to much use for scripting.
No comments:
Post a Comment