none
Deploy .Net 4.0 framework using windows setup project in silent mode

    Question

  • I have found numerous examples of how to install the .net 4.0 client framework in silent mode  using command line arguments along with other extras. My problem is I'm using a Windows Setup project to distribute my application and there is no where to specify those command line arguments when the installation determines that the selected .Net Framework prerequisite is not found and needs to install. I have specified to download prequisites from the same location as my application and it's presenting the .Net Framework installation and installs successfully before continuing with the actual installation of my application. 

    I'm trying to avoid presenting the .Net dialogue windows to the user and make it appear seamlessly as part of my application's setup. I am using VS2010 with the default WIndows Setup project. Will try the InstallShield LE setup as well. 

    Any help is greatly appreciated. 

     


    Santiago Perez Software Engineer
    Tuesday, May 31, 2011 9:12 PM

Answers

All replies

  • You can modify the existing prerequisite or create a custom one. 

    You can find the Visual Studio default prerequisites in one of these locations:

    c:\Program Files\Microsoft SDKs\Windows\v6.0A\Bootstrapper\Packages\
    c:\Program Files\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages\

    Each prerequisite has its own folder which contains an XML manifest. You can modify the .NET Framework manifest to use the silent install command line.

    If you want to create your own custom prerequisite, you can use the bootstrapper manifest generator.

     


    Cosmin Pirvu
    Wednesday, June 01, 2011 7:16 AM
  • In addition to Cosmin, you can create your own bootstrapper:"

    http://social.msdn.microsoft.com/Forums/en-NZ/winformssetup/thread/44124b84-ab85-4de1-8e5a-1dfac76b3f5e

    With a bat or others program load the .net framework installation with command line.

     

    This can help you to do a silent installation.

    But if you want to combine the .net framework installation and your setup installation, then I don't think so visual studio setup project is a good option, since it is hard to create a smart installation with the setup project. If you also want this advance feature, then I suggest you choose others installer tools.

     

    Best wishes,


    Mike [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.

    Wednesday, June 01, 2011 7:30 AM
    Moderator
  • Cosmin and Mike thanks for the great information. Cosmin, I think the default Prerequisite at c:\Program Files\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages\ will do the trick. Only thing I don't understand is how do I bind the Product.xml (Manifest) to the setup project?

    In other words, If I've specified that "Download prequisites from the same location as my application" in the setup project, do I need to just drop the Product.xml in the same path with my

    setup.exe for it to read the xml and take the Arguments in the Command Node?

     




    Santiago Perez Software Engineer
    Thursday, June 02, 2011 6:23 PM
  • You can customize the Product.xml file and change the Commands section to use the quiet argument.

    http://msdn.microsoft.com/en-us/library/aa372024(v=VS.85).aspx

    http://msdn.microsoft.com/en-us/library/bb490936.aspx

    Then you can add this prerequisites into your setup project through the prerequisites box.

     

    Or you can use custom action start a bat:

    http://social.msdn.microsoft.com/Forums/en-US/netfxsetup/thread/28402bd5-1240-4e8b-9cdd-2f9300901e19/

     

    But not all installers would support silent installation:

    http://social.msdn.microsoft.com/Forums/en/winformssetup/thread/d43f50a6-6645-4d6a-b02f-bd1025f0d161

     

    Best wishes,


    Mike [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, June 03, 2011 6:02 AM
    Moderator
  • Hi  Santiago Perez,
    I am writing to check the status of the issue on your side. 
    What about this problem now? 
    Would you mind letting us know the result of the suggestions?
    Best wishes,

    Mike [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, June 06, 2011 5:58 AM
    Moderator
  • I have followed the directions at http://msdn.microsoft.com/en-us/library/ee726596.aspx

    for creating a custom bootstrapper by copying DotNetFX40 and renaming it. Problem is I don't see the new name showing up in my prerequisites list. Do I need to sign this package or something? Also, that link talks about a click once deployment, I'm working on a standard windows setup project, does it matter? 

     

    Thanks, 

    Santiago 

     

     


    Santiago Perez Software Engineer
    Tuesday, June 07, 2011 1:55 PM
  • Ok getting somewhat more success using the Bottostrap generator however I still get a Dialog box prompting the user if they want to install the components in my custom package.
    Santiago Perez Software Engineer
    Tuesday, June 07, 2011 5:43 PM
  • You can use the "Bootstrapper Manifest Generator" tool to generate a custom bootstrapper, and then copy the result into the "Bootstrapper\Packages" under the Microsoft SDK directory.

    You can reference the MSDN document to generate this package:

    http://msdn.microsoft.com/en-us/library/ms165429.aspx

    You can download the prerequisites installer file first, and then use this tool generate the bootstrapper, then you can package the prerequisites installer file together with your application in the final install file.

    And sometimes, it will give you a exception message when you build the package, then we just can ignore it, as far as I know it will not effect our package.

     

    And if you have any question about "Bootstrapper Manifest Generator", then you can go to the special forum to look for more expert help on this tool:

    http://archive.msdn.microsoft.com/bmg/Thread/List.aspx


    Mike [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, June 08, 2011 5:48 AM
    Moderator
  • Thanks Mike for your help. I have successfully created the custom bootstrap package with the dotNetFx40_Full_x86_x64.exe file included in the package and am able to get it to run upon execution of setup.exe. My problem is that I am getting multiple dialog boxes during the installation of the .net framework. First there is a dialog box created from the bootstrap asking me if it's ok to run the installation for my custom Bootstrap package. Then once I confirm I get the security warning dialog for the .Net Framework installation itself. I have tried /q as specified in http://msdn.microsoft.com/en-us/library/ee390831.aspx#command_lineoptions in the Arguments field for the  dotNetFx40_Full_x86_x64.exe in the Properties tab and have tried several other combinations like /qn /passive and /q /passive but no matter what I always get these dialog boxes. I have confirmed that the folders and files in my bin/release folder for my setup project are updated each time I compile. And yes I always compile the package in the bootstrap generator tool before compiling my setup project. 

     


    Santiago Perez Software Engineer
    Wednesday, June 08, 2011 1:46 PM
  • Maybe it does not support silent installation.

    You can execute this in a command line, to see if it can be installed silent, and then use that command in the bootstrapper.

     

    Please show us this test result after you do what I told you in this post.

    Best wishes,


    Mike [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, June 09, 2011 8:29 AM
    Moderator
  • I did exactly that and can confirm that .Net 4.0 full can and does install in silent mode or passive. I ran the following from a command prompt:

    dotnetfx40_full_x86_x64.exe  setup /q /log %temp%\Setuplog.htm

    I also ran the following command and it worked 

    dotnetfx40_full_x86_x64.exe  setup /passive /log %temp%\Setuplog.htm

    I then took the "setup /q /log %temp%\Setuplog.htm" arguments and placed them into the bootstrapper generator and compiled. Opened up the the Package.xml and verified it was in the XML. Ran the setup.exe but still get the two dialog windows to pop. I know someone out there has to know how to make this work. Could it be a possible case of signing the bootstrap package? 


    Santiago Perez Software Engineer
    Thursday, June 09, 2011 1:35 PM
  • Hi,

    I think the following command line parameters would be ok:

    dotnetfx.exe /q:a /c:"install /l /q"

    ref : http://msdn.microsoft.com/en-us/library/xhz1cfs8(v=vs.90).aspx

     

    Best wishes,


    Mike [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, June 10, 2011 5:36 AM
    Moderator
  • Can you tell me what the proper syntax would be to use those commands in the Product.xml? This is not proper XML

     

        <Command PackageFile="dotnetfx40_full_x86_x64.exe" 

    Arguments="/q:a /c:"install /l /q""             

    EstimatedInstalledBytes="1909616640"

                EstimatedInstallSeconds="900"

                EstimatedTempBytes="303106560">


    Santiago Perez Software Engineer
    Friday, June 10, 2011 7:34 PM
  • dotnetfx.exe /q = run dotnetfx.exe silently
    :a = do not show the extraction user interface
    /c: = runs this command after unpacking files
    "install /q" = run install silently (command being run)
    /l "log.log" = create a log file named log.log
    This line would work:
        dotnetfx.exe /q:a /c "install /q"

    If there's any concern, please feel free to let us know.
    Best wishes,

    Mike [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, June 13, 2011 6:00 AM
    Moderator
  • Hi Santiago Perez,
    I am writing to check the status of the issue on your side. 
    What about this problem now? 
    Would you mind letting us know the result of the suggestions?
    Best wishes,

    Mike [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, June 15, 2011 6:22 AM
    Moderator