mstaton
Posts: 17
Joined: Wed Apr 22, 2009 2:24 pm

Installing dot net framework 3.5

I am getting lost in the details on this. Due to some complexities with other necessary components and the need for a custom UI, we have a dialog with a button to install prerequisites (instead of using AI's built-in prerequisite interface). I need to install .net 3.5 as silently as possible when the user clicks a button. What is the best way to do this?

I have a search for if the framework is installed and a custom action that fires only when needed, based on the search property. The UI is working up to the point of firing an exe when needed. But what exe to fire? Do I need to make my own bootstrapper for this?
dms
Posts: 164
Joined: Tue Aug 28, 2007 7:11 am
Location: UK

Re: Installing dot net framework 3.5

Having just had to do this myself let me try and point you at least part way in the right direction.

The .exe file that you are after is dotnetfx35.exe available from here;
http://www.microsoft.com/downloads/deta ... laylang=en

Its a large file and acts as a cumulative update from .net 1.1 (installing only that which it deems to be necessary. Given that the .net3.5 sp1 is only another 30 mb or so in size it's almost worth going for that and getting it all over with in one hit. If you then use the following command line you should get a silent iinstall
/qb /norestart


Hope this helps


Dom
mstaton
Posts: 17
Joined: Wed Apr 22, 2009 2:24 pm

Re: Installing dot net framework 3.5

Thanks, Dom. I tried executing dotnetfx35.exe from a custom action but got the error that windows installer can only have one instance running. I did not give it any command line arguments. I will try the command line you suggested and hopefully that solves the problem.
dan12345678
Posts: 3
Joined: Wed Apr 29, 2009 8:40 am

Re: Installing dot net framework 3.5

Hi there,

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?

Thanks,
Newbie.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Installing dot net framework 3.5

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
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”