Talk:DotNET: Difference between revisions

From NSIS Wiki
Jump to navigationJump to search
No edit summary
 
 
(10 intermediate revisions by 5 users not shown)
Line 1: Line 1:
In the script for the first example the pops for the register restore are in the wrong order.
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:
<br/>a) Detect .Net 3.5
<br/>b) Install into it!
<br/>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:
<nowiki>ExecWait '"$TEMP\dotnetfx.exe" /q /c:"install /q"'</nowiki>
== 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:
  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}
</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."
  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>

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}