|
-
Apr 20th, 2007, 10:14 AM
#1
Thread Starter
Fanatic Member
[RESOLVED] [Inno Setup] Check if Net Framework 2.0 is installed
Hi!!
How can i check if Net Framework 2.0 is intalled
Thks
Last edited by Lasering; Apr 20th, 2007 at 03:41 PM.
-
Apr 20th, 2007, 06:02 PM
#2
Re: [Inno Setup] Check if Net Framework 2.0 is installed
Doesn't the .NET framework check to see if it is already installed when it attempts to install?
-
Apr 21st, 2007, 05:56 AM
#3
Thread Starter
Fanatic Member
Re: [Inno Setup] Check if Net Framework 2.0 is installed
I dont know couse i have already the net framework installed on all my computers.
But does the Inno Setup does that by default?
-
Apr 21st, 2007, 12:35 PM
#4
Re: [Inno Setup] Check if Net Framework 2.0 is installed
Inno has nothing to do with the .NET framework, so it doesn't check for it.
-
Apr 21st, 2007, 12:44 PM
#5
Re: [Inno Setup] Check if Net Framework 2.0 is installed
So, why don't you attempt to re-install the .NET framework to see if it checks if it is already installed???
-
Apr 21st, 2007, 09:05 PM
#6
Addicted Member
Re: [Inno Setup] Check if Net Framework 2.0 is installed
Something else to do is to do what I have started doing lately.
1. download and install Microsoft Virtual PC 2007 (FREE)
2. install an OS on it (requires you have a liscense for that OS that not already being used)
3. install all Windows updates
4. defrag and compact the install
5. mark the virtual hard drive as readonly
6. create a differencing hard drive based main one you just created
7. install and test what ever you want, only the differencing disk will change
8. repeat steps 6 and 7 as needed
I know this doesn't answer your immediate issue, but may be useful, and it's a good way to test your installations and applications in various systems as if you were installing it on a users PC.
I've provided a link to the artiale that describes using Virtual PC and differencing disks.
CT
-
Apr 23rd, 2007, 12:23 PM
#7
Thread Starter
Fanatic Member
Re: [Inno Setup] Check if Net Framework 2.0 is installed
Thks a lot Cavar, but i dont have 2 licenses, i just have my windows.
How can i do a If in Inno Setup like:
If Registrykeythattellsmeifnetisinstalled=true then
continue installer
else
Msgbox("Pls visit http://... to install net framework"
end if
The key i go find to see which is it.
-
Apr 23rd, 2007, 12:28 PM
#8
Re: [Inno Setup] Check if Net Framework 2.0 is installed
You can write code for that in Inno Setup.
-
Apr 23rd, 2007, 01:10 PM
#9
Thread Starter
Fanatic Member
Re: [Inno Setup] Check if Net Framework 2.0 is installed
that i already knew! Thks anyway!!!
But how can i do the part continue? And how can i do for this code to be processed before anything?
EDIT: I found how to do part of it
VB Code:
[Code]
function InitializeSetup(): Boolean;
begin
If {reg:HKLM\Software\Microsoft\NET Framework Setup\NDP\v2.0.50727,Install} := 0 then 'in here i dont know how to do this correctly
MsgBox('The setup detected that .Net Framework 2.0 is not installed in your system.' #13#13 'Please install it. You can download it from http://www.microsoft.com/downloads/details.aspx?FamilyID=0856eacb-4362-4b0d-8edd-aab15c5e04f5&DisplayLang=en', mbInformation, mb_Ok);
Result := False
end;
now i just need to know how to make a clickable link the msgbox and how to the the if line, if u know what i mean.
Last edited by Lasering; Apr 23rd, 2007 at 02:11 PM.
-
Apr 24th, 2007, 02:36 AM
#10
Re: [Inno Setup] Check if Net Framework 2.0 is installed
You can ask Klienma. He does Inno Code. He hangs out in the VB .NET forums.
-
Apr 24th, 2007, 03:25 AM
#11
New Member
Re: [Inno Setup] Check if Net Framework 2.0 is installed
Hi,
just dropped by since I was searching for a way to check if windows media player is installed on a win2k system within inno ...
if anyone knows please let me know...
Anyway here is some code to check for .net 2.0... and send the user to ms to download .net if not available on the system...
Code:
[CustomMessages]
en.dotnetmissing=This setup requires the .NET Framework v2.0. Please download and install the .NET Framework v.2 and run this setup again. Do you want to download the framework now?
de.dotnetmissing=Dieses Programm benötigt Microsoft .NET Framework v2.0. Bitte downloaden und installieren Sie Microsoft .NET Framework v2.0 und führen Sie anschliessend die Installation erneut aus. Wollen Sie das Framework jetzt downloaden?
Code:
function InitializeSetup(): Boolean;
var
ErrorCode: Integer;
NetFrameWorkInstalled : Boolean;
Result1 : Boolean;
begin
NetFrameWorkInstalled := RegKeyExists(HKLM,'SOFTWARE\Microsoft\.NETFramework\policy\v2.0');
if NetFrameWorkInstalled =true then
begin
Result := true;
end;
if NetFrameWorkInstalled = false then
begin
NetFrameWorkInstalled := RegKeyExists(HKLM,'SOFTWARE\Microsoft\.NETFramework\policy\v2.0');
if NetFrameWorkInstalled =true then
begin
Result := true;
end;
if NetFrameWorkInstalled =false then
begin
//Result1 := (ExpandConstant('{cm:dotnetmissing}'), mbConfirmation, MB_YESNO) = idYes;
Result1 := MsgBox(ExpandConstant('{cm:dotnetmissing}'),
mbConfirmation, MB_YESNO) = idYes;
if Result1 =false then
begin
Result:=false;
end
else
begin
Result:=false;
ShellExec('open',
'http://download.microsoft.com/download/5/6/7/567758a3-759e-473e-bf8f-52154438565a/dotnetfx.exe',
'','',SW_SHOWNORMAL,ewNoWait,ErrorCode);
end;
end;
end;
end;
cheers
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|