Embedding Microsoft .NET Framework to the Application Setup won't be a good idea unless you are distributing it via a CD.
I'd suggest you to try a simple Installer like Inno. In Inno setup script you can have the following code:
[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\v1.1');
if NetFrameWorkInstalled =true then
begin
Result := true;
end;
if NetFrameWorkInstalled =false then
begin
Result1 := MsgBox('This setup requires the Microsoft .NET Framework 1.1. Please download and install the .NET Framework and run this setup again.',
mbConfirmation, MB_OK) = idYes;
if Result1 =false then
begin
Result:=false;
end
else
begin
Result:=false;
end;
end;
end;
end;
The installer will detect if there is .NET Framework is installed and the user will be taken to the page where she can download the latest .NET Framework version.
Congratulations on your move to C# from Java.
Cheers,
McoreD