Embedded Local Download File Issue

Jul 6, 2010 at 12:03 PM
Edited Jul 6, 2010 at 12:04 PM
Hi I'm trying to use a 'download dialog' to run an .exe from within the embedded CAB. It seems to be extracting to a folder that doesn't exist, I think. Can anyone point out where I've gone wrong? Relevant part of the configuration file: <component command=""#TEMPPATH\Silverlight3\silverlight.exe"" command_silent="" command_basic="" uninstall_command="" uninstall_command_silent="" uninstall_command_basic="" returncodes_success="" returncodes_reboot="" id="Microsoft Silverlight" display_name="Microsoft Silverlight" uninstall_display_name="" os_filter_greater="" os_filter_smaller="" os_filter_lcid="" type="cmd" installcompletemessage="" uninstallcompletemessage="" mustreboot="False" reboot_required="" must_reboot_required="False" failed_exec_command_continue="" allow_continue_on_error="True" required="False" selected="True" note="English - Standard - x86 - Silverlight 3" processor_architecture_filter="" status_installed="" status_notinstalled="" supports_install="True" supports_uninstall="False"> <downloaddialog dialog_caption="Silverlight 3 - Download Components" dialog_message="Press 'Start' to download the required components for installing COMPONENT_NAME." dialog_message_downloading="Downloading ..." dialog_message_copying="Copying ..." dialog_message_connecting="Connecting ..." dialog_message_sendingrequest="Sending request ..." autostartdownload="True" buttonstart_caption="Start" buttoncancel_caption="Cancel"> <download componentname="Silverlight 3" sourceurl="" sourcepath="#CABPATH\silverlight3\silverlight.exe" destinationpath="#TEMPPATH\silverlight3" destinationfilename="silverlight.exe" alwaysdownload="True" clear_cache="False" /> </downloaddialog> <installedcheck path="\Program Files\Microsoft Silverlight" type="check_directory" description="Installed Check" /> <embedfile sourcefilepath="#APPPATH\SupportFiles\silverlight3\silverlight.exe" targetfilepath="#TEMPPATH\Silverlight3\silverlight.exe" /> </component> Log file extract: --- Component 'Microsoft Silverlight' (Microsoft Silverlight): EXECUTING 2010-07-06 11:54:00 Extracting embedded files for component 'Microsoft Silverlight': 1 CAB(s) 2010-07-06 11:54:00 Resolved CAB path 'C:\Users\BABYTA~1\AppData\Local\Temp\{9FDE2432-3A47-441F-8077-3A056C19F081}' for component 'MICROSOFT_SILVERLIGHT' 2010-07-06 11:54:00 Extracting 'SETUP_MICROSOFT_SILVERLIGHT_1.CAB' for component 'MICROSOFT_SILVERLIGHT' 2010-07-06 11:54:00 Extracting: C:\Users\BABYTA~1\AppData\Local\Temp\{9FDE2432-3A47-441F-8077-3A056C19F081}\Silverlight3\silverlight.exe 2010-07-06 11:54:00 Done: C:\Users\BABYTA~1\AppData\Local\Temp\{9FDE2432-3A47-441F-8077-3A056C19F081}\Silverlight3\silverlight.exe 2010-07-06 11:54:01 Destination 'C:\Users\BABYTA~1\AppData\Local\Temp\silverlight3\silverlight.exe', exists=False, copy=False 2010-07-06 11:54:01 Destination 'C:\Users\BABYTA~1\AppData\Local\Temp\silverlight3\silverlight.exe', exists=False, download=False 2010-07-06 11:54:01 *** Component 'Microsoft Silverlight': SKIPPING DOWNLOAD/COPY 2010-07-06 11:54:01 Executing: "C:\Users\BABYTA~1\AppData\Local\Temp\Silverlight3\silverlight.exe" 2010-07-06 11:54:01 *** Component 'Microsoft Silverlight' (Microsoft Silverlight): ERROR - 0x80070002 - CreateProcessW: "C:\Users\BABYTA~1\AppData\Local\Temp\Silverlight3\silverlight.exe": The system cannot find the file specified. 2010-07-06 11:54:01 --- Component 'Microsoft Silverlight (Microsoft Silverlight)' FAILED: 0x80070002 - CreateProcessW: "C:\Users\BABYTA~1\AppData\Local\Temp\Silverlight3\silverlight.exe": The system cannot find the file specified. 2010-07-06 11:54:04 --- Component 'Microsoft Silverlight (Microsoft Silverlight): FAILED, ABORTING Many thanks! Sam
Coordinator
Jul 6, 2010 at 1:56 PM

Start by making the embedded file work, then add the download dialog. In your setup change the executable of the component (command property) to #CABPATH\Silverlight3\silverlight.exe.

Download allows you to download files. Embedded CAB allows you to embed the files. They serve the same purpose of bringing the file to the machine. So you don't need a download dialog if you are embedding the file. If you want to build two variations of the installer: one that has the files embedded and another that has the download, then you're on the right track. You just need to make sure to download and execute to/from #CABPATH so that your two installer versions (one built with /embed+ and another without) run things from the same place. The version that has Silverlight3 embedded will extract and run it. The version that doesn't, will download and run it.

Jul 8, 2010 at 9:02 AM
Thanks dblock - it was the #CABPATH bit I needed. I am actually only trying to build an installer with embedded files. End users won't always have internet access so I'm building the full executables of .Net 3.5, SQL Server Express and Silverlight along with my four .msi files in to one setup.exe requiring the minimum of input (ie one click!) from the user. I'm new to DNI so I've just tried to put something together from the (few) examples and other poster's questions on this forum. It seems to be doing most of what I need with the download dialog switches so I will leave them as is. Just a couple of tasks left to do - run a batch file, pass the correct parameters in to the MSSQL setup and make it install silently and ensure uninstall works. So I may be back for more help! Thanks Sam