Rehevkor
11th July 2003 05:20 UTC
The newbie and the .NET detect script
Yup, I'm new to NSIS. I find it infinitely more appealing than the windows installer, and thanks to the excellent NSIS Workbench program I had little trouble creating my setup file. However, I want to add the .NET Framework detect script to my setup so that I can give the user a URL to download the framework and abort the installation. I just finished a huge program in VB.NET, but this scripting language is boggling me.
Basically, what I need to know is how and where I should call this function in order to achieve the result I mentioned above. Anyone have some advice for me? :)
Note: I did a search of the forums on this topic, and none of them answered my question.
kichik
11th July 2003 11:57 UTC
The forums are not the only source of information ;)
Take a look at this page:
http://nsis.sourceforge.net/archive/....php?pageid=24
Rehevkor
11th July 2003 18:21 UTC
I found that; it's the .NET detect script I was referring to. I don't understand how to implement it though.
Rehevkor
11th July 2003 19:09 UTC
I got it to work... sort of. I put the code near the top of the file, but it won't attempt to detect .NET until after the user clicks "Install." I want it to detect, and if it fails, to pop up a message box right before the license screen. Where should I put the code to do that?
kichik
12th July 2003 13:06 UTC
Put the function itself anywhere in the script and then put this code where you want to check for .NET:
Call IsDotNETInstalled
Pop $0
StrCmp $0 1 +3
MessageBox MB_OK "no .NET bla bla"
Abort
You'd probably want to put this in .onInit.
Rehevkor
13th July 2003 07:08 UTC
Thanks! That was exactly what I needed to know.