Talk:DotNET: Difference between revisions
(2 intermediate revisions by 2 users not shown) | |||
Line 20: | Line 20: | ||
== DotNET3Point5 == | == DotNET3Point5 == | ||
Why does the system call to GetCORVersion not work for .NET 3.5 ? It returns "v2.0.xxxx" here. | |||
Using registry key "hack": [[How_to_Detect_any_.NET_Framework]] | |||
== Using inetc plug-in for download == | |||
I prefer the [[Inetc plug-in]] because it has a better proxy support than [[Builtin_NSISdl_plug-in|NSISdl]]. | |||
Just download the [[Inetc plug-in]] ZIP file, extract the ''inetc.dll'' and put it into your plugin folder. | |||
Than replace these lines within DotNET.nsh | |||
<highlight-nsis> | |||
DownloadDotNET: | DownloadDotNET: | ||
DetailPrint "Beginning download of latest .NET Framework version." | DetailPrint "Beginning download of latest .NET Framework version." | ||
NSISDL::download ${DOTNET_URL} "$TEMP\ | NSISDL::download ${DOTNET_URL} "$TEMP\dotnetfx.exe" | ||
DetailPrint "Completed download." | DetailPrint "Completed download." | ||
Pop $0 | Pop $0 | ||
Line 120: | Line 46: | ||
IDYES NewDotNET IDNO GiveUpDotNET | IDYES NewDotNET IDNO GiveUpDotNET | ||
${EndIf} | ${EndIf} | ||
DetailPrint " | </highlight-nsis> | ||
with those lines | |||
<highlight-nsis> | |||
DownloadDotNET: | |||
DetailPrint "Beginning download of latest .NET Framework version." | |||
inetc::get "${DOTNET_URL}" "$TEMP\dotnetfx.exe" "/end" | |||
DetailPrint "Completed download." | |||
DetailPrint " | |||
Pop $0 | Pop $0 | ||
${If} $0 == "Cancelled" | |||
MessageBox MB_YESNO|MB_ICONEXCLAMATION \ | |||
"Download cancelled. Continue Installation?" \ | |||
IDYES NewDotNET IDNO GiveUpDotNET | |||
${ElseIf} $0 != "OK" | |||
MessageBox MB_YESNO|MB_ICONEXCLAMATION \ | |||
"Download failed:$\n$0$\n$\nContinue Installation?" \ | |||
IDYES NewDotNET IDNO GiveUpDotNET | |||
${EndIf} | |||
</highlight-nsis> | </highlight-nsis> | ||
Latest revision as of 10:18, 5 January 2010
In the script for the first example the pops for the register restore are in the wrong order.
--PLJ-- Some day someone will work out how to:
a) Detect .Net 3.5
b) Install into it!
If anyone knows how, document it, please.
Installing on non English systems
This script fails on Japanese windows XP with the error:
"Command line option syntax error. Type Command /? for Help"
The fix is simple: Encase the path in ExecWait with inverted commas '"'.
I.e. change to:
ExecWait '"$TEMP\dotnetfx.exe" /q /c:"install /q"'
DotNET3Point5
Why does the system call to GetCORVersion not work for .NET 3.5 ? It returns "v2.0.xxxx" here.
Using registry key "hack": How_to_Detect_any_.NET_Framework
Using inetc plug-in for download
I prefer the Inetc plug-in because it has a better proxy support than NSISdl.
Just download the Inetc plug-in ZIP file, extract the inetc.dll and put it into your plugin folder.
Than replace these lines within DotNET.nsh
DownloadDotNET: DetailPrint "Beginning download of latest .NET Framework version." NSISDL::download ${DOTNET_URL} "$TEMP\dotnetfx.exe" DetailPrint "Completed download." Pop $0 ${If} $0 == "cancel" MessageBox MB_YESNO|MB_ICONEXCLAMATION \ "Download cancelled. Continue Installation?" \ IDYES NewDotNET IDNO GiveUpDotNET ${ElseIf} $0 != "success" MessageBox MB_YESNO|MB_ICONEXCLAMATION \ "Download failed:$\n$0$\n$\nContinue Installation?" \ IDYES NewDotNET IDNO GiveUpDotNET ${EndIf}
with those lines
DownloadDotNET: DetailPrint "Beginning download of latest .NET Framework version." inetc::get "${DOTNET_URL}" "$TEMP\dotnetfx.exe" "/end" DetailPrint "Completed download." Pop $0 ${If} $0 == "Cancelled" MessageBox MB_YESNO|MB_ICONEXCLAMATION \ "Download cancelled. Continue Installation?" \ IDYES NewDotNET IDNO GiveUpDotNET ${ElseIf} $0 != "OK" MessageBox MB_YESNO|MB_ICONEXCLAMATION \ "Download failed:$\n$0$\n$\nContinue Installation?" \ IDYES NewDotNET IDNO GiveUpDotNET ${EndIf}