Downloading .net Framework from vendor website

Jul 31, 2009 at 8:59 AM
Edited Jul 31, 2009 at 9:18 AM

Hi,

How to force the download from Microsoft?

 

I've tried following your user guide and doing

1. Right click on install > add component wizard

2. Check the req. framework

3. In the downloaded from internet textbox i put the url from where to download the framework

 

When i click ok and save the configuration and i search the configuration.xml i can't see the URL anywhere.

 

EDIT: I tried adding a web setup component but i can't save the configuration.xml gives me this error:

System.InvalidOperationException: Token StartAttribute in state Content would result in an invalid XML document.
   at System.Xml.XmlTextWriter.AutoComplete(Token token)
   at System.Xml.XmlTextWriter.WriteStartAttribute(String prefix, String localName, String ns)
   at System.Xml.XmlWriter.WriteAttributeString(String localName, String value)
   at InstallerLib.Configuration.OnXmlWriteTag(XmlWriterEventArgs e)
   at InstallerLib.WebConfiguration.OnXmlWriteTag(XmlWriterEventArgs e)
   at InstallerLib.XmlClassImpl.ToXml(XmlWriter p_Writer)
   at InstallerLib.IXmlClassCollection`1.ToXml(XmlWriter p_Writer)
   at InstallerLib.XmlClassImpl.ToXml(XmlWriter p_Writer)
   at InstallerLib.ConfigFile.get_Xml()
   at InstallerLib.ConfigFile.SaveAs(String p_FileName)
   at InstallerEditor.MainForm.SaveConfiguration()

 

 

Aug 2, 2009 at 12:07 AM

Hi dahkiam,

 to make a component download its target, you have to do the following:

  1.  Add Command Component (or whatever component you like, but, most things could be done with command component)
  2. Specify where to execute what - the command (e. g. "#CABPATH\en\dotnetfx35.exe" /q:a /c:"install /qb")
  3. Add a download dialog to this component and set it up how you like (i. e. should it auto start, etc.)
  4. Add a download file to the download dialog from 3.
  5. In the download dialog you can add the URL (e. g. "http://download.microsoft.com/download/6/0/f/60fc5854-3cb8-4892-b6db-bd4f42510f28/dotnetfx35.exe"), the destination file name (e. g. "dotnetfx35.exe"), the destination path (this must be the same as the path from 2., e. g. "#CABPATH\en") and the source path (this is the path where it should be looked if the file exists, e. g. "#APPPATH\SupportFiles\dotNet3.5\en\dotnetfx35.exe")

The examples above come frome an .Net 3.5 component which downloads the setup if it is not present and which has an install check. In XML it looks like the following (you can paste it in your configuration and see everything descriped above):

<component command="&quot;#CABPATH\en\dotnetfx35.exe&quot; /q:a /c:&quot;install /qb&quot;" command_silent="" command_basic="" os_filter_greater="" os_filter_smaller="" os_filter_lcid="" type="cmd" installcompletemessage="" mustreboot="False" reboot_required="" must_reboot_required="False" failed_exec_command_continue="" allow_continue_on_error="False" required="True" description="Microsoft .NET Framework 3.5" note="English - Standard - .NET Framework 3.5" processor_architecture_filter="" status_installed="" status_notinstalled="">
<installedcheck path="Software\Microsoft\NET Framework Setup\NDP\v3.5" fieldname="Install" fieldvalue="1" fieldtype="REG_DWORD" comparison="match" rootkey="HKEY_LOCAL_MACHINE" wowoption="NONE" type="check_registry_value" description="Installed Check" />
<downloaddialog dialog_caption="Microsoft .NET Framework 3.5 - Download Components" dialog_message="Press 'Start' to download the required components for installing Microsoft .NET Framework 3.5." dialog_message_downloading="Download in progress. Wait..." dialog_message_connecting="Connecting ..." dialog_message_sendingrequest="Sending request ..." autostartdownload="False" buttonstart_caption="Start" buttoncancel_caption="Cancel"> <download componentname="Microsoft .NET Framework 3.5" sourceurl="http://download.microsoft.com/download/6/0/f/60fc5854-3cb8-4892-b6db-bd4f42510f28/dotnetfx35.exe" sourcepath="#APPPATH\SupportFiles\dotNet3.5\en\dotnetfx35.exe" destinationpath="#CABPATH\en" destinationfilename="dotnetfx35.exe" alwaysdownload="False" />
</downloaddialog> </component>

(sorry, the code formatting of codeplex is pretty bad)

Please ask, if you have further questions.

Regards,
Tom 

 

 

Aug 3, 2009 at 8:19 AM

Thanks a lot Tom. Working great now.

Did not exactly implement it they way you described but I now have a better understanding how the product.

Cheers.