Closed abouAlAbass closed 5 years ago
Have a look at 'NsisBootstrapper' and 'WixBootstrapper' samples. They both show how to distribute .NET
no i want to install my version of dotnetFramework with this code
`
try
{
Process process = new Process();
process.StartInfo.FileName = "/dotNetFx40_Full_x86_x64.exe";
process.StartInfo.UseShellExecute = false;
process.Start();
process.WaitForExit();
}
catch(Exception e)
{
MessageBox.Show(e.Message);
}
` but it show the exception -> File note found exception i put the msi installer and the DotNetFramework installer in the same file, if they are a function to get the current path of the msi?
You can't run .net framework installation during the MSI installation, parallel installations are not supported by the windows msi engine. .Net should be installed before you MSI, as it was indicated by Oleg, use one of the bootstrappers.
i find the solution to get the current path of the MSI ` static void project_UIInit(SetupEventArgs e) {
MsiFile = e.MsiFile;
}
`
i have tried to use wixhsarp to check if dotnet framewok is installed or not with this code below
project.Include(WixExtension.NetFx); project.SetNetFxPrerequisite("WIX_IS_NETFRAMEWORK_461_OR_LATER_INSTALLED >= '#394254'", "requires .NET Framework 4.6.1 or higher.");
the second problem it's that i don't find how to install dotnet framwork if it's not installed