Relative URL - download from local web server

Apr 12, 2010 at 2:33 PM
Edited Apr 13, 2010 at 8:12 AM

I've moved from the Visual Studio bootstrapper to the dotNetInstaller. One nice feature with the Visual Studio bootstrapper, was the possibility to tell the bootstrapper to use relative URL's for downloading the .NET components. I've done this with using the following MSBuild tasks:


	ApplicationFile="$(TargetFileName)" ApplicationName="MyApp" 
        CopyComponents="True" ComponentsLocation="Relative" 
        Path="C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bootstrapper\"  />

How can I accomplish the same with dotNetInstaller? I see from the deployment guide that there's a difference between the dotNetFx35setup.exe and dotNetFx35.exe. On my computer the Package under (C:\Program Files (x86)\Microsoft SDKs\Windows\v6.0A\Bootstrapper\Packages\DotNetFX35) doesn't contain a dotNetFx35.exe - just the dotNetFx35setup.exe. This package got copied to my bin\Debug folder when running the GenereateBootstrapper msbuild file.

How should I address this in order to be able to get this ComponentsLocation behavior with dotNetInstaller? 

I've added a StackOverflow question regarding the subject.

Apr 15, 2010 at 12:01 AM

I am totally confused :) Can you maybe try to explain this to me like a 2 year old from the dotNetInstaller perspective (rather than the VS bootstrapper which is totally mystery meat for me).

Apr 15, 2010 at 6:44 AM


I have set up a dependency to the .NET framework in my application configuration. Here's how my XML file looks like:


    command="&quot;#TEMPPATH\dotNetRuntime_Download_#PID\dotnetfx35.exe&quot; /lang:ENU /qb /norestart" 
    command_silent="" command_basic="" uninstall_command=""
    uninstall_command_silent="" uninstall_command_basic=""
    returncodes_success="" returncodes_reboot="3010"
    id="Microsoft .NET Framework 3.5" 
    display_name="Microsoft .NET Framework 3.5" 
    uninstall_display_name="" os_filter_greater="" 
    os_filter_smaller="" os_filter_lcid="" type="cmd" 
    installcompletemessage="" uninstallcompletemessage="" 
    mustreboot="False" reboot_required="False" 
    must_reboot_required="False" failed_exec_command_continue="" 
    allow_continue_on_error="False" required="True" 
    selected="True" note="" processor_architecture_filter="" 
    status_installed="" status_notinstalled="" supports_install="True" 
      dialog_caption=".NET Runtime 3.5 - Download Components" 
      dialog_message="Press 'Start' to download the .NET Runtime 3.5" 
      dialog_message_downloading="Downloading installer ..." 
      dialog_message_copying="Copying ..." 
      dialog_message_connecting="Connecting ..." 
      dialog_message_sendingrequest="Sending request ..." 
      autostartdownload="False" buttonstart_caption="Start" 
        componentname=".NET Runtime 3.5 SP1" 
        sourcepath="" destinationpath="#TEMPPATH\dotNetRuntime_Download_#PID" 
        alwaysdownload="False" clear_cache="False" />
       path="SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.5" 
       fieldname="Version" fieldvalue="3.5.30729.01" 
       defaultvalue="False" fieldtype="REG_SZ" 
       comparison="version_ge" rootkey="HKEY_LOCAL_MACHINE" 
       wowoption="NONE" type="check_registry_value" 
       description="Installed Check" />

This works very well, but when the dotNetFx35setup.exe file downloaded on a machine which hasn't got .NET 3.5 installed and it starts executing, it will contact Microsoft's web pages to download the .NET framework. What I would like the dotNetFx35setup.exe file to do is to download the .NET framework from the same web server as the dotNetFx35setup.exe file itself is downloaded from. 

The reason I mention the VS bootstrapper is that I'm able to specify the ComponentsLocation="Relative" and then the bootstrapper downloads the .NET framework components from the same server as the bootstrapper is downloaded from.

Question is - is it possible to get this behavior from the dotNetInstaller? I guess that I can't use the dotNetFx35setup.exe since it doesn't have any command line parameters telling it where to download the .NET framework from.  



Apr 15, 2010 at 4:01 PM
Edited Apr 15, 2010 at 4:07 PM

This looks like magic to me. How does the downloaded bootstrapper know where it was downloaded from? Or how does the bootstrapper accomplish "dynamically telling dotNetFx35setup.exe that the url to download from is some specific location"?

I think you should just swap dotNetFx35setup.exe for the full 200MB .NET Framework setup that works without an internet connection. People who don't have .NET framework 3.5 will just donwload it from your installerurl intranet location, which should be fast.