dabossuk
28th July 2003 13:25 UTC
checking .NET versions
Hi
I have been using the .NET script that checks for .NET installed, and it works just fine.
However as .NET 1.1 is now out - the script does not check for differnet versions :-) ... would someone mind updating the script so it can check for 1.1 as well as 1.0. Sorry its a little beyond my skills to change.
Also in case people are planning on doing this, I have found that using GACutil.exe to put .NET components into the global assembly cache works just fine in NSIS. ;-)
Thanks
DabossUK
kichik
2nd August 2003 10:56 UTC
I don't think it will be too hard to add a check for a minial version in the script. If you add and upload it here I'll update the archive page.
dabossuk
5th August 2003 12:19 UTC
Hey
Sorry, but changing that code is a little over my skill level. Still do not funny understand all the functions.
However, I scrapped the .NET script (for some reason the version is NOT stored in the registry from what I can see. So I have used this method instead. Does the job so guess thats ok ;-) ?
IfFileExists $WINDIR\Microsoft.NET\Framework\v1.1.4322\*.* abort
MessageBox MB_YESNO|MB_ICONEXCLAMATION "Service requires the Microsoft .NET Framework 1.1 to run. $\r$\nThe installer cannot find a version installed on this machine. $\r$\n Do you wish to install from the Internet ? $\r$\nIf not please install .NET Framework and rerun the installer." IDYES +1 IDNO Abort2
ExecShell open http://msdn.microsoft.com/netframewo...s/howtoget.asp
Abort
Afrow UK
5th August 2003 12:42 UTC
That may not work if the directory is
v1.1.4323 or something slightly different.
You should find the directory that is v1.1* using FindFirst/Next:
ClearErrors
FindFirst $R0 $R1 "$WINDIR\Microsoft.NET\Framework\v1.1*"
loop:
IfErrors error
IfFileExists "$R1\*.*" exit
ClearErrors
FindNext $R0 $R1
Goto loop
error:
MessageBox MB_OK "You do not have M$ .NET 1.1 or higher installed!"
exit:
FindClose $R0
iceman_k
5th August 2003 13:42 UTC
Of course, this solution won't work once .NET 1.2 is released. :D
LordKurgan
2nd April 2004 02:18 UTC
Can someone post the full script on how to check if 1.1 is intalled
Joost Verburg
2nd April 2004 13:55 UTC
See above.
LordKurgan
4th April 2004 23:32 UTC
i'm no good with coding there any change u code cut and paste me together a scrip and tell me where to stick it in the nsi file :)
Joost Verburg
5th April 2004 07:57 UTC
Put it in a section or function where you need to know the version.
LordKurgan
6th April 2004 03:35 UTC
how?
Joost Verburg
6th April 2004 14:20 UTC
I have no idea what you mean. This is normal NSIS script code. If you don't know the script langauge you'll have to learn it first.