Old 28th July 2003, 12:25   #1
dabossuk
Junior Member
 
Join Date: Jan 2003
Location: London
Posts: 43
Send a message via ICQ to dabossuk
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
dabossuk is offline   Reply With Quote
Old 2nd August 2003, 09:56   #2
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
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.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 5th August 2003, 11:19   #3
dabossuk
Junior Member
 
Join Date: Jan 2003
Location: London
Posts: 43
Send a message via ICQ to dabossuk
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
dabossuk is offline   Reply With Quote
Old 5th August 2003, 11:42   #4
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
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:

code:
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

Afrow UK is offline   Reply With Quote
Old 5th August 2003, 12:42   #5
iceman_k
NSIS Dev
 
iceman_k's Avatar
 
Join Date: Feb 2003
Location: Boston, MA, U.S.A.
Posts: 455
Of course, this solution won't work once .NET 1.2 is released.

Cheers,
Iceman_K

EclipseNSIS - An NSIS IDE for the Eclipse Platform | My contributions to the wiki
iceman_k is offline   Reply With Quote
Old 2nd April 2004, 02:18   #6
LordKurgan
Junior Member
 
Join Date: Apr 2004
Posts: 7
Can someone post the full script on how to check if 1.1 is intalled
LordKurgan is offline   Reply With Quote
Old 2nd April 2004, 13:55   #7
Joost Verburg
NSIS MUI Dev
 
Join Date: Nov 2001
Posts: 3,717
See above.
Joost Verburg is offline   Reply With Quote
Old 4th April 2004, 22:32   #8
LordKurgan
Junior Member
 
Join Date: Apr 2004
Posts: 7
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
LordKurgan is offline   Reply With Quote
Old 5th April 2004, 06:57   #9
Joost Verburg
NSIS MUI Dev
 
Join Date: Nov 2001
Posts: 3,717
Put it in a section or function where you need to know the version.
Joost Verburg is offline   Reply With Quote
Old 6th April 2004, 02:35   #10
LordKurgan
Junior Member
 
Join Date: Apr 2004
Posts: 7
how?
LordKurgan is offline   Reply With Quote
Old 6th April 2004, 13:20   #11
Joost Verburg
NSIS MUI Dev
 
Join Date: Nov 2001
Posts: 3,717
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.
Joost Verburg is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump