better version of IsDotNETInstalled
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4723 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
729b7cd451
commit
5890f372eb
1 changed files with 8 additions and 43 deletions
|
@ -303,6 +303,9 @@
|
|||
|
||||
\c ; IsDotNETInstalled
|
||||
\c ;
|
||||
\c ; Based on GetDotNETVersion
|
||||
\c ; http://nsis.sourceforge.net/Get_.NET_Version
|
||||
\c ;
|
||||
\c ; Usage:
|
||||
\c ; Call IsDotNETInstalled
|
||||
\c ; Pop $0
|
||||
|
@ -311,52 +314,14 @@
|
|||
\c Function IsDotNETInstalled
|
||||
\c Push $0
|
||||
\c Push $1
|
||||
\c Push $2
|
||||
\c Push $3
|
||||
\c Push $4
|
||||
\c
|
||||
\c ReadRegStr $4 HKEY_LOCAL_MACHINE \
|
||||
\c "Software\Microsoft\.NETFramework" "InstallRoot"
|
||||
\c # remove trailing back slash
|
||||
\c Push $4
|
||||
\c Exch $EXEDIR
|
||||
\c Exch $EXEDIR
|
||||
\c Pop $4
|
||||
\c # if the root directory doesn't exist .NET is not installed
|
||||
\c IfFileExists $4 0 noDotNET
|
||||
\c
|
||||
\c StrCpy $0 0
|
||||
\c
|
||||
\c EnumStart:
|
||||
\c
|
||||
\c EnumRegKey $2 HKEY_LOCAL_MACHINE \
|
||||
\c "Software\Microsoft\.NETFramework\Policy" $0
|
||||
\c IntOp $0 $0 + 1
|
||||
\c StrCmp $2 "" noDotNET
|
||||
\c
|
||||
\c StrCpy $1 0
|
||||
\c
|
||||
\c EnumPolicy:
|
||||
\c
|
||||
\c EnumRegValue $3 HKEY_LOCAL_MACHINE \
|
||||
\c "Software\Microsoft\.NETFramework\Policy\$2" $1
|
||||
\c IntOp $1 $1 + 1
|
||||
\c StrCmp $3 "" EnumStart
|
||||
\c IfFileExists "$4\$2.$3" foundDotNET EnumPolicy
|
||||
\c
|
||||
\c noDotNET:
|
||||
\c StrCpy $0 1
|
||||
\c System::Call "mscoree::GetCORVersion(w, i ${NSIS_MAX_STRLEN}, *i) i .r1"
|
||||
\c StrCmp $1 0 +2
|
||||
\c StrCpy $0 0
|
||||
\c Goto done
|
||||
\c
|
||||
\c foundDotNET:
|
||||
\c StrCpy $0 1
|
||||
\c
|
||||
\c done:
|
||||
\c Pop $4
|
||||
\c Pop $3
|
||||
\c Pop $2
|
||||
\c Pop $1
|
||||
\c Exch $0
|
||||
\c Pop $1
|
||||
\c Exch $0
|
||||
\c FunctionEnd
|
||||
|
||||
\H{isflashinstalled} Is Macromedia Flash Player installed?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue