Talk:DotNET

From NSIS Wiki
Jump to navigationJump to search

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}