Detect the Microsoft Java Machine version: Difference between revisions
From NSIS Wiki
Jump to navigationJump to search
No edit summary |
mNo edit summary |
||
(One intermediate revision by one other user not shown) | |||
Line 13: | Line 13: | ||
Function "JVM" | Function "JVM" | ||
GetDLLVersion "$WINDIR\ | GetDLLVersion "$WINDIR\jview.exe" $0 $1 | ||
IntOp $2 $0 / 0x00010000 | IntOp $2 $0 / 0x00010000 | ||
IntOp $3 $0 & 0x0000FFFF | IntOp $3 $0 & 0x0000FFFF | ||
Line 20: | Line 20: | ||
StrCpy $R0 "$2.$3.$4.$5" | StrCpy $R0 "$2.$3.$4.$5" | ||
StrCmp $2 "0" +1 +7 | StrCmp $2 "0" +1 +7 | ||
GetDLLVersion "$SYSDIR\ | GetDLLVersion "$SYSDIR\jview.exe" $0 $1 | ||
IntOp $2 $0 / 0x00010000 | IntOp $2 $0 / 0x00010000 | ||
IntOp $3 $0 & 0x0000FFFF | IntOp $3 $0 & 0x0000FFFF | ||
Line 40: | Line 40: | ||
[[Category:Other Products Version Detection Functions]] | [[Category:Other Products Version Detection Functions]] | ||
[[Category:Java]] |
Latest revision as of 03:58, 29 April 2008
Author: Joel (talk, contrib) |
The Script
; Detect the The Microsoft Java Virtual Machine version ; Bugs? Post them in the Nsis Forums ; http://nsis.sourceforge.net/archive/viewpage.php?pageid=304 OutFile "JVM.exe" Name "Detect JVM version" Caption "Detect JVM version" XPStyle "on" Function "JVM" GetDLLVersion "$WINDIR\jview.exe" $0 $1 IntOp $2 $0 / 0x00010000 IntOp $3 $0 & 0x0000FFFF IntOp $4 $1 / 0x00010000 IntOp $5 $1 & 0x0000FFFF StrCpy $R0 "$2.$3.$4.$5" StrCmp $2 "0" +1 +7 GetDLLVersion "$SYSDIR\jview.exe" $0 $1 IntOp $2 $0 / 0x00010000 IntOp $3 $0 & 0x0000FFFF IntOp $4 $1 / 0x00010000 IntOp $5 $1 & 0x0000FFFF StrCpy $R0 "$2.$3.$4.$5" MessageBox MB_OK|MB_ICONINFORMATION "Microsoft JVM version: $R0" Quit FunctionEnd Function ".onInit" Call "JVM" FunctionEnd Section "-boo" ; SectionEnd