xdizen
02-21-2005, 09:29 AM
Hi all
Here is my problem
I have developped the code below (using inno installer)
What it does it checks if the .net framework is installed.If not, it prompts the user to download it and install it. This is all good
Now, my problem is that when the .net is present and installed, i would like to run a vb.net apllication (here ABC.exe). This file is in the same folder as the .iss file. Problem: i dont know how to do it ???
can anyone help ?
Thanks
[Setup]
AppName=NETFramewrok
AppVerName=NETFramewrok
DefaultDirName={pf}\NETFramewrok
DisableStartupPrompt=true
[Code]
function InitializeSetup(): Boolean;
var
ErrorCode: Integer;
NetFrameWorkInstalled : Boolean;
Result1 : Boolean;
begin
//Get the key for the .net framework if installed
NetFrameWorkInstalled := RegKeyExists(HKLM,'SOFTWARE\Microsoft\.NETFramework\policy\v1.1');
//The .Net Framework is installed, time to run the vb.net project to install JIDS
if NetFrameWorkInstalled = true then
begin
//I would like to run the vb.net project here in the same directory as the .iss file (this one)
end;
//The .Net Framework is not installed, the user is prompted to install
//the .Net Framework from the web
if NetFrameWorkInstalled = false then
begin
Result1 := MsgBox('.Net framework must be installed Do you want to download the framework now?', mbConfirmation, MB_YESNO) = idYes;
if Result1 =false then
begin
Result:=false;
end
else
begin
Result:=false;
InstShellExec('http://download.microsoft.com/download/a/a/c/aac39226-8825-44ce-90e3-bf8203e74006/dotnetfx.exe','','',SW_SHOWNORMAL,ErrorCode);
end;
end;
end;
//[Run]
//if RunApp = true then
// begin
// Filename: "ABC.exe";
//end ;
Here is my problem
I have developped the code below (using inno installer)
What it does it checks if the .net framework is installed.If not, it prompts the user to download it and install it. This is all good
Now, my problem is that when the .net is present and installed, i would like to run a vb.net apllication (here ABC.exe). This file is in the same folder as the .iss file. Problem: i dont know how to do it ???
can anyone help ?
Thanks
[Setup]
AppName=NETFramewrok
AppVerName=NETFramewrok
DefaultDirName={pf}\NETFramewrok
DisableStartupPrompt=true
[Code]
function InitializeSetup(): Boolean;
var
ErrorCode: Integer;
NetFrameWorkInstalled : Boolean;
Result1 : Boolean;
begin
//Get the key for the .net framework if installed
NetFrameWorkInstalled := RegKeyExists(HKLM,'SOFTWARE\Microsoft\.NETFramework\policy\v1.1');
//The .Net Framework is installed, time to run the vb.net project to install JIDS
if NetFrameWorkInstalled = true then
begin
//I would like to run the vb.net project here in the same directory as the .iss file (this one)
end;
//The .Net Framework is not installed, the user is prompted to install
//the .Net Framework from the web
if NetFrameWorkInstalled = false then
begin
Result1 := MsgBox('.Net framework must be installed Do you want to download the framework now?', mbConfirmation, MB_YESNO) = idYes;
if Result1 =false then
begin
Result:=false;
end
else
begin
Result:=false;
InstShellExec('http://download.microsoft.com/download/a/a/c/aac39226-8825-44ce-90e3-bf8203e74006/dotnetfx.exe','','',SW_SHOWNORMAL,ErrorCode);
end;
end;
end;
//[Run]
//if RunApp = true then
// begin
// Filename: "ABC.exe";
//end ;