section -.net framework ; detection is required. Net framework version Call getnetframeworkversion pop $R 1 ;${if} $R 1 < ' 2.0.50727 ' ;${If} $R 1 < ' 3.5.30729.4926 ' ${If} $R 1 < ' 4.0.30319 ' ;${If} $R 1 < ' 4.5.52747 ' messagebox mb_yesno| mb_iconquestion "This software is required to run the. net framework 4.0 run environment, but you do not seem to have this environment installed on your machine. $\r$\n you have two options: $\r$\n1. You download the. net framework 4.0 installation, and then run the software $\r$\n2. Use this installer for downloading and installing the .net online framework 4.0$\r$\n$\r$\n now download and install it online. net framework 4.0, make sure your machine is connected to the Internet. Do you want to continue? " idno +2 call downloadnetframework4${endif} sectionendfunction getnetframeworkversion; get. Net framework Version Support Push $1push $0readregdword $0 HKLM "Software\microsoft\net framework setup\ndp\v4\full" "Install" Readregdword $1 HKLM "Software\microsoft\net framework setup\ndp\v4\full" "Version" strcmp $0 1 KnowNetFrameworkVersion +1ReadRegDWORD $0 HKLM "software\microsoft\net framework setup\ndp\v3.5 " " Install "readregdword $1 hklm " software\microsoft\net framework setup\ndp\v3.5 " " Version "strcmp $0 1 knownetframeworkversion + 1readregdword $0 hklm "Software\microsoft\net framework setup\ndp\v3.0\setup" " Installsuccess "readregdword $1 hklm " software\microsoft\net framework setup\ndp\v3.0\ Setup " " Version "STRCMP&NBSP;$0&NBSP;1&NBSP;KNOWNETFRAMEWORKVERSION&NBSP;+1READREGDWORD&NBSP;$0&NBSP;HKLM "software\microsoft\net framework setup\ndp\v2.0.50727" "Install" readregdword $1 HKLM "software\microsoft\net framework setup\ndp\v2.0.50727" "Version" strcmp $1 "" +1 +2strcpy $1 "2.0.50727.832" strcmp $0 1 knownetframeworkversion +1readregdword $0 HKLM "software\microsoft\net framework setup\ndp\v1.1.4322" "Install" Readregdword $1 HKLM "software\microsoft\net framework setup\ndp\v1.1.4322" "Version" StrCmp $1 "" +1 +2StrCpy $1 "1.1.4322.573" strcmp $0 1 knownetframeworkversion +1readregdword $0 hklm "Software\microsoft\. netframework\policy\v1.0 " " Install "readregdword $1 hklm " software\microsoft\. netframework\policy\v1.0 " " Version "strcmp $1 " " +1 +2StrCpy $1 " 1.0.3705.0 " strcmp $0 1 knownetframeworkversion +1strcpy $1 "NOT&NBSP; NETFramework "knownetframeworkversion:pop $0exch $1functionendfunction downloadnetframework2; Download &NBSP;.NET&NBSP;FRAMEWORK&NBSP;2.0&NBSP;SP2&NBSP;&NBSP;NSISDL::d ownload /translate2 ' Downloading %s ' ' connecting ... ' ' (remaining 1 seconds) ' ' (remaining 1 minutes) ' ' (remaining 1 hours) ' ' (remaining %u seconds) ' ' (remaining %u minutes) ' ' (remaining %u hours) ' ' Completed:%SKB (%d%%) Size:%skb Speed:%u.%0 1ukb/s ' /TIMEOUT=7500 /NOIEPROXY ' http://download.microsoft.com/download/c/6/e/ C6e88215-0178-4c6c-b5f3-158ff77b1f38/netfx20sp2_x86.exe ' ' $TEMP \netfx20sp2_x86.exe ' pop $ r0 strcmp $R 0 "Success" 0 +3 SetDetailsPrint textonly DetailPrint "Installing .net framework 2.0 sp2 ..." SetDetailsPrint listonly execwait ' $TEMP \netfx20sp2_x86.exe /quiet /norestart ' $R 1 delete "$TEMP \netfx20sp2_x86.exe" functionendfunction downloadnetframework35; download .NET FRAMEWORK&NBSP;3.5&NBSP;SP1&NBSP;&NBSP;NSISDL::d ownload /translate2 ' is downloading %s ' ' is connecting ... ' ' (Remaining 1 seconds) ' ' (remaining 1 minutes) ' ' (remaining 1 hours) ' ' (remaining %u seconds) ' ' (remaining %u min) ' ' (remaining %u hours) ' ' Completed:%SKB (%d%%) size:%skb speed:%u.%0 1ukb/s ' /TIMEOUT=7500 /NOIEPROXY ' http://download.microsoft.com/download/2/0/E/ 20e90413-712f-438c-988e-fdaa79a8ac3d/dotnetfx35.exe ' ' $TEMP \dotnetfx35.exe ' Pop $R 0 StrCmp $R 0 "Success" 0 +2 SetDetailsPrint textonly detailprint "Installing &NBSP;.NET&NBSP;FRAMEWORK&NBSP;3.5&NBSP;SP1 ..." setdetailsprint listonly ExecWait ' $TEMP \dotnetfx35.exe /quiet /norestart ' $R 1 delete " $TEMP \dotnetfx35.exe "functionendfunction downloadnetframework4; download .NET Framework 4.0 &NBSP;NSISDL::d ownload /translate2 ' downloading %s ' ' connecting ... ' ' (remaining 1 seconds) ' ' (remaining 1 minutes) ' ' (remaining 1 hours) ' ' (remaining %u seconds) ' ' (remaining %u minutes) ' ' (remaining %u hours) ' ' Completed:%SKB (%d%%) size:%skb Speed:%u.%0 1ukb/s ' /TIMEOUT=7500 /NOIEPROXY ' http://download.microsoft.com/download/9/5/A/ 95a9616b-7a37-4af6-bc36-d6ea96c8daae/dotnetfx40_full_x86_x64.exe ' ' $TEMP \dotnetfx40_full_x86_x64.exe ' Pop $R 0 strcmp $R 0 "Success" 0 +2 setdetailsprint textonly detailprint "Installing .net framework 4.0 full ... " SetDetailsPrint listonly ExecWait ' $TEMP \dotnetfx40_full_x86_x64.exe / Quiet /norestart ' $R 1 delete "$TEMP \dotnetfx40_full_x86_x64.exe" functionendfunction downloadnetframework45; Download .net framework 4.5 nsisdl:: download /translate2 ' downloading %s ' ' connecting ... ' ' (remaining 1 seconds) ' ' (remainder 1 minutes) ' ' (remaining 1 hours) ' ' (remaining &NBsp;%u seconds) ' ' (remaining %u minutes) ' ' (remaining %u hours) ' ' Completed:%SKB (%d%%) size:%skb Speed:%u.%0 1ukb/s ' /TIMEOUT=7500 /NOIEPROXY ' http://download.microsoft.com/download/E/2/1/ E21644b5-2df2-47c2-91bd-63c560427900/ndp452-kb2901907-x86-x64-allos-enu.exe ' ' $TEMP \ Ndp452-kb2901907-x86-x64-allos-enu.exe ' Pop $R 0 strcmp $R 0 "Success" 0 +2 SetDetailsPrint textonly DetailPrint "Installing .NET FRAMEWORK&NBSP;4.5.2&NBSP: " SetDetailsPrint listonly ExecWait " $TEMP \ Ndp452-kb2901907-x86-x64-allos-enu.exe /quiet /norestart ' $R 1 delete "$TEMP \ Ndp452-kb2901907-x86-x64-allos-enu.exe "FunctionEnd
NSIs detecting the. NET framework and downloading it online