Archive: Download dialog and .NET FW check


Download dialog and .NET FW check
Hello all!
I'm still new to NSIS so the first question is a easy one.

1. I want to download a file. I can download the file, but how do I show the dialog.

Here is my code:
NSISDLSmooth::download "http://www.balder.ms/downloads/dotnetfx1.1.exe" "$EXEDIR\dotnetfx.exe"

2. I want to do a check for .NET Framework v1.1 or newer(when it comes) The code I have works fine for know, but dont know when there is a new release..

Here is my code:
ClearErrors
ReadRegStr $0 HKLM "Software\Microsoft\.NETFramework\policy\v1.1" "4322"
IfErrors Error
Goto End

Error:
MessageBox MB_OK|MB_ICONSTOP "Setup could not detect Microsoft .NET Framework v1.1 on this computer. $\n Please install Microsoft .NET Framework v1.1 and run setup again."
ABORT

End:


There is already a function to detect the .net framework in
NSIS archive. You can take a look at it.


Yes, that one it great, but my app that I'm installing doesn't support .NET Framework v1.0.

I just upgraded from VS.NET 2002 to VS.NET 2003 Final Beta, and the programs I develop no longer work on PC's with .NET Framework v1.0
Stupid me didn't know about that before I upgraded..

Thanks!


Well, if it's just v1.0 that doesn't work you can add one StrCmp to the already existing function and then it will only work with v1.1 and above. After line 25 (StrCmp $2 "" noDotNET) add StrCmp $2 "v1.0" EnumStart. This will cause the function to return 0 is only v1.0 is installed.

Does the normal NSISdl shows the dialog?


oh, OK :) Thanks!
No, the normal NSISdl doesn't show it either. I read the readme.txt that follows and it also says:
To translate NSISdl add:
/TRANSLATE downloading connecting second minute hour plural progress remianing
to the call line.

Default values are:
downloading - "Downloading %s"
connecting - "Connecting ..."
second - "second"
minute - "minute"
hour - "hour"
plural - "s"
progress - "%dkB (%d%%) of %dkB @ %d.%01dkB/s"
remaining - "(%d %s%s remaining)"

/TRANSLATE must come before /TIMEOUT.

But like I said, I'm a newbie, so I dont understand how to use it...

Thanks!


Sorry about the confusion. lol. Forget about the translate thing.
The problem was that I didn't have the code in a section, it was in Function .onGUIInit.

All is fine now, and thanks again to all!

Have a nice weekend everyoen!


kichik. Does it work if a user has both .NET v1.0 and v1.1 or higher installed?
Cuz some people just install the v1.1 without uninstalling the v1.0 first..

Thanks again!


It will not return 1 if the user has only v1.0. If the user has both installed it will return 1.


Works perfectly! Thanks again!