PDA

View Full Version : Know the current version of windows


clebeaup
31st May 2001, 08:58
Hello,

My program only works on Windows 2000 Server.
Is there a solution to know the version of windows ? For the moment I read the reg to get the current version. It could be interesting to integrate a command to know the version of windows.

Thanks

Cyrille

cablenut
31st May 2001, 17:32
ReadRegStr $9 "HKLM" "SOFTWARE\Microsoft\Windows NT\CurrentVersion" "ProductName"
ReadRegStr $8 "HKLM" "SOFTWARE\Microsoft\Windows\CurrentVersion" "ProductName"
WriteINIStr "$INSTDIR\cablenut.ini" "Install" "OperatingSystem" "$9$8"

Windows 2000 and 98 as you know have both different places for storing the ProductName.