From: SourceForge.net <no...@so...> - 2003-07-17 12:41:21
|
Bugs item #772877, was opened at 2003-07-17 11:40 Message generated for change (Comment added) made by joostverburg You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=373085&aid=772877&group_id=22049 >Category: Documentation Group: None >Status: Closed >Resolution: Out of Date Priority: 5 Submitted By: Nobody/Anonymous (nobody) >Assigned to: Joost Verburg (joostverburg) Summary: xp-support for GetWindowsVersion Initial Comment: because Yazno's page is not available i`ve drooed it here take a look on it bye Michael Sonst ;------------------------------------------------------ ------------------------ ; GetWindows Version ; ; Based on Yazno's function, http://yazno.tripod.com/powerpimpit/ ; Returns: ; ; $0 = Windows Version (95, 98, ME, NT, 2K, XP) ;modified ; or ; $0 = '' (Unknown Windows Version) ; ; last modified: 17.07.03 ; by : Michael Sonst ; adress : web...@fo... ; added : XP Support Function GetWindowsVersion Push $9 ReadRegStr $0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion StrCmp $0 "" 0 lbl_winnt ; we are not NT. ReadRegStr $0 HKLM SOFTWARE\Microsoft\Windows\CurrentVersion VersionNumber StrCpy $9 $0 1 StrCmp $9 '4' 0 lbl_error StrCpy $9 $0 3 StrCmp $9 '4.0' lbl_win32_95 StrCmp $9 '4.9' lbl_win32_ME lbl_win32_98 lbl_win32_95: StrCpy $0 '95' Goto lbl_done lbl_win32_98: StrCpy $0 '98' Goto lbl_done lbl_win32_ME: StrCpy $0 'ME' Goto lbl_done lbl_winnt: StrCpy $9 $0 1 StrCmp $9 '3' lbl_winnt_x StrCmp $9 '4' lbl_winnt_x StrCpy $9 $0 3 ;modified StrCmp $9 '5.0' lbl_winnt_2K ;modified StrCmp $9 '5.1' lbl_winnt_XP lbl_error ;modified lbl_winnt_x: StrCpy $0 'NT' 2 Goto lbl_done lbl_winnt_2k: ;modified Strcpy $0 '2K' 2 Goto lbl_done lbl_winnt_XP: ;modified Strcpy $0 'XP' 2 Goto lbl_done lbl_error: Strcpy $0 '' lbl_done: Pop $9 FunctionEnd ---------------------------------------------------------------------- >Comment By: Joost Verburg (joostverburg) Date: 2003-07-17 14:41 Message: Logged In: YES user_id=604457 NSIS 2 already includes an updated function with XP / 2003 support. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=373085&aid=772877&group_id=22049 |