Hi,
mstaton wrote:I tried executing dotnetfx35.exe from a custom action but got the error that windows installer can only have one instance running.
Please note that another MSI-based installation cannot run during the InstallExecuteSequence of your main package. If you want to install .Net Framework on a button push, you can try this approach:
- add the .NET Framework installer as a
temporary file in the "Files and Folders" page (you can use the "Windows Volume\Temporary" folder)
- in the
Custom Actions page create a new
Property Source UI Custom Action
- in the
Custom Action Properties pane set the "Property Name" field to the
property of the temporary file
- set the "Command Line" field to the arguments you want to pass to the .NET Framework installer (this field can be empty)
- set the custom action to run when the custom button is pressed; see the
Execute custom action on button push how-to for more details
Please note that this approach can be used only in an Enterprise project.
dan12345678 wrote:I was able to install .NET3.5 with the command line argument with dotnetfx35.exe embedded into the installation file.
However the installer file becomes a .exe and not a .msi - does anyone know whether it is possible to have the the install file a .msi?
You can use the approach I explained above. Please note that this requires the MSI install to use an UI.
Although it is not recommended, another approach is this:
- add the .NET Framework installer in the "Files and Folders" page so it is installed by your package
- in the
Custom Actions page create a "New Installer Custom Action" under "InstallExecuteSequence" -> "InstallFinalize" (you can show "InstallFinalize" through the "Show Standard Action" toolbar button or context menu)
- when prompted about a file, choose the .NET Framework installer
- in the
Custom Action Properties pane select the "Asynchronous execution, do not wait for return" option
This way .NET Framework will be installed after the main install. Also, the main install doesn't need to run with an UI.
Please note that the recommended method for installing .NET Framework is by using prerequisites.
Regards,
Cosmin
FOLLOW US
Get the latest news in Application Packaging