Skip to content
Newer
Older
100644 45 lines (41 sloc) 1.05 KB
3f89d56 @Tobbe Initial commit to this repository
authored
1 ; GetIEVersion
2 ;
3 ; Based on Yazno's function, http://yazno.tripod.com/powerpimpit/
4 ; Returns on top of stack
5 ; 1-6 (Installed IE Version)
6 ; or
7 ; '' (IE is not installed)
8 ;
9 ; Usage:
10 ; Call GetIEVersion
11 ; Pop $R0
12 ; ; at this point $R0 is "5" or whatnot
13
14 Function GetIEVersion
15 Push $R0
16 ClearErrors
17 ReadRegStr $R0 HKLM "Software\Microsoft\Internet Explorer" "Version"
18 IfErrors lbl_123 lbl_456
19
20 lbl_456: ; ie 4+
21 Strcpy $R0 $R0 1
22 Goto lbl_done
23
24 lbl_123: ; older ie version
25 ClearErrors
26 ReadRegStr $R0 HKLM "Software\Microsoft\Internet Explorer" "IVer"
27 IfErrors lbl_error
28
29 StrCpy $R0 $R0 3
30 StrCmp $R0 '100' lbl_ie1
31 StrCmp $R0 '101' lbl_ie2
32 StrCmp $R0 '102' lbl_ie2
33 StrCpy $R0 '3' ; default to ie3 if not 100, 101, or 102.
34 Goto lbl_done
35 lbl_ie1:
36 StrCpy $R0 '1'
37 Goto lbl_done
38 lbl_ie2:
39 StrCpy $R0 '2'
40 Goto lbl_done
41 lbl_error:
42 StrCpy $R0 ''
43 lbl_done:
44 Exch $R0
45 FunctionEnd
Something went wrong with that request. Please try again.