Installing .NET framework through MSI

Posted on 2005-05-01
Last Modified: 2008-02-01
Hi all,
How do I wrap the .NET framework installation into my app installation process (msi) but not as a link (InstallURL).
I wan't to be able to install the framework on a machine that is not connected to network.
Question by:udibs
    LVL 21

    Expert Comment

    try the following:

    right-click your setup project, select view, select custom action.

    right-click install, then browse to your dotnetfx.exe file

    it will start installation of dotnet framework support. keep in mind, it will increase the size of your deployment file by 20+ MB

    also you can try to check this linke:

    a good article for deployments


    Author Comment

    Thanks Yuri,
    I still don't understand. I've installed the Visual Studio 2003 bootstrapper plug in (from gotdotnet).
    When I build the setup project I can see the dotnetfx.exe in the setup project output directory, along with my msi,
    but how do I refere to it from the custom action view?
    I mean in the custom action view | Install I can see the target dir (application folder) and under it only
    the primary output of my C# project. I don't see the dotnetfx.exe there. I don't see it in the file view either.
    The plug in just put it in the output directory for me when I build the setup project.
    Is it supposed to be launched automatically, or should I instruct the user to launch it manually if necessary?
    What it the framework is already installed? does the dotnetfx.exe just exits quietly or does it install the framework anyway?

    The reason I can't check the answer for that is that when I try to install my msi I get an error code 2705.
    Any idea?

    I guess I can do this whole process manually, meaning - adding the dotnetfx.exe to my Files view, and then execute it from the
    custom actions view (Is that what you meant in the first place?), if so - How do I check if the framework is already installed on the target machine, since I wouldn't want to install the dotnetfx.exe in this case.

    Here is extra 50 points.
    Thanks again!
    LVL 21

    Accepted Solution

    actually i did mean to have it installed manually, sorry wasn't clear enough. using bootstrap is better than manual of course, bootstrapper should do everything automatically, that's what it does:

    Checks to see if a specified version of the .NET Framework is installed on the target computer.
    If the specified version is not installed, it launches a silent installation of Dotnetfx.exe and, if necessary, upgrades to Windows Installer 2.0. A computer reboot might be required.
    Installs the host .NET Framework application. If a computer reboot is required, it is suppressed until the host application is finished installing.

    and I'm sure you have been on that link already:


    LVL 21

    Expert Comment

    unless it's stated that the way I suggested didn't work (which should have worked), I'd say, the answer was given.

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Join & Write a Comment

    Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
    This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    This video discusses moving either the default database or any database to a new volume.

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now