Alaska Software Inc. - .net on compuer?
Username: Password:
AuthorTopic: .net on compuer?
Nestor Guido.net on compuer?
on Mon, 16 Nov 2009 08:37:02 +0200
Hi All,

Can anyone tell tell me how I can know programmatically if there is dot net 
installed on the computer and what version it is.

Any help in this regard would greatly be appreciated.

Kind regards,

Nestor
Adrian WykrotaRe: .net on compuer?
on Mon, 16 Nov 2009 11:18:14 +0100
Check registry key. Sample from InnoSetup.

function InitializeSetup(): Boolean;
var
  ErrorCode: Integer;
  NetFrameWorkInstalled : Boolean;
  Result1 : Boolean;
begin
  NetFrameWorkInstalled := 
RegKeyExists(HKLM,'SOFTWARE\Microsoft\.NETFramework\policy\v1.0');
  if NetFrameWorkInstalled then
  begin
    Result := true;
  end else
  begin
    NetFrameWorkInstalled := 
RegKeyExists(HKLM,'SOFTWARE\Microsoft\.NETFramework\policy\v1.1');
    if NetFrameWorkInstalled then
    begin
      Result := true;
    end else
    begin
      Result1 := MsgBox('This setup requires the .NET Framework. Please 
download and install the .NET Framework and run this setup again. Do you 
want to download the framwork now?',
        mbConfirmation, MB_YESNO) = idYes;
      if Result1 =false then
      begin
        Result:=false;
      end else
      begin
        Result:=false;
        ShellExec('open',
          'http://download.microsoft.com/download/a/a/c/aac39226-8825-44ce-90e3-bf8203e74006/dotnetfx.exe',
          '','',SW_SHOWNORMAL,ewNoWait,ErrorCode);
      end;
    end;
  end;
end;


Best regards
Adrian Wykrota
Użytkownik "Nestor Guido" <nestor@softwareclinic.co.za> napisał w wiadomości 
news:12d2108b$5923f3b$8deb9@news.alaska-software.com...
> Hi All,
>
> Can anyone tell tell me how I can know programmatically if there is dot 
> net installed on the computer and what version it is.
>
> Any help in this regard would greatly be appreciated.
>
> Kind regards,
>
> Nestor
>
mark carew Re: .net on compuer?
on Mon, 16 Nov 2009 21:40:06 +1000
On Mon, 16 Nov 2009 08:37:02 +0200, Nestor Guido wrote:

> Hi All,
> 
> Can anyone tell tell me how I can know programmatically if there is dot net 
> installed on the computer and what version it is.
> 
> Any help in this regard would greatly be appreciated.
> 
> Kind regards,
> 
> Nestor


Hi Nestor
c:
cd\windows\Microsoft.net\framework
dir /ad
should show sonme of the following folders
v1.10.3705  .net 1
v1.14322    .net 1.1
v2.0.5027   .net 2      
v3.0        .net 3.0
v3.5        .net 3.5 
v4.0.2056   Beta 1
v4.0.21006  Beta 2 
Note that they can all co-exist happily

Mark
Nestor GuidoRe: .net on compuer?
on Mon, 16 Nov 2009 15:11:26 +0200
Hi Adrian and Mark,

Thank you for sharing your knowlege on this subject.....
I will study the information supplied and see what I can come up with for my 
project.

Again many thanks.

Kind regards,
 Nestor

"Nestor Guido" <nestor@softwareclinic.co.za> wrote in message 
news:12d2108b$5923f3b$8deb9@news.alaska-software.com...
> Hi All,
>
> Can anyone tell tell me how I can know programmatically if there is dot 
> net installed on the computer and what version it is.
>
> Any help in this regard would greatly be appreciated.
>
> Kind regards,
>
> Nestor
>