Blame | Last modification | View Log | RSS feed
!macro IsDotNETInstalled; IsDotNETInstalled;; Usage:; Call IsDotNETInstalled; Pop $0; StrCmp $0 1 found.NETFramework no.NETFrameworkFunction IsDotNETInstalledPush $0Push $1Push $2Push $3Push $4ReadRegStr $4 HKEY_LOCAL_MACHINE \"Software\Microsoft\.NETFramework" "InstallRoot"# remove trailing back slashPush $4Exch $EXEDIRExch $EXEDIRPop $4# if the root directory doesn't exist .NET is not installedIfFileExists $4 0 noDotNETStrCpy $0 0EnumStart:EnumRegKey $2 HKEY_LOCAL_MACHINE \"Software\Microsoft\.NETFramework\Policy" $0IntOp $0 $0 + 1StrCmp $2 "" noDotNETStrCpy $1 0EnumPolicy:EnumRegValue $3 HKEY_LOCAL_MACHINE \"Software\Microsoft\.NETFramework\Policy\$2" $1IntOp $1 $1 + 1StrCmp $3 "" EnumStartIfFileExists "$4\$2.$3" foundDotNET EnumPolicynoDotNET:StrCpy $0 0Goto donefoundDotNET:StrCpy $0 1done:Pop $4Pop $3Pop $2Pop $1Exch $0FunctionEnd!macroend