Novice trouble - embedding the msi file

Jun 1, 2010 at 9:00 PM

I'm a NOOB and I am having trouble figuring out how to
embed my MSI properly.  Any help with this is greatly appreciated...
Also, I'm pretty confused, so please excuse my ramblings.

Here are the painful details:

I just upgraded to the beta release (1.10.8408.0) of DotNetInstaller (I did this
because I am having difficulty embedding my MSI file, and I looked at the beta
and thought it had some nice features, and who knows?  Maybe my problem would
go away - but it has not gone away... ugh.

When I run installlinker, I do it like this, from the "MyInstaller" folder on root of C:

installerLinker /Output:setup.exe /Template:dotNetInstaller.exe
        /Configuration:configuration.xml /Banner:MTbanner.bmp /Embed+ /Verbose+

The output from this is:

InstallerLinker: dotNetInstaller Packager (1.10.8408.0)

Creating "C:\myInstaller\setup.exe" from "C:\myInstaller\dotNetInstaller.exe"
Updating binary attributes in "C:\myInstaller\setup.exe"
 CompanyName: MyCompany Inc.
 FileDescription: MyInstaller Installer
 fileversion: 1.0
 productversion: 1.0
 LegalCopyright: Copyright 2010 MySoftware Inc, Arlington VA USA
 ProductName: MySoftware
Writing CABs to "C:\Users\gap\AppData\Local\Temp\72b166f0-74a7-49af-8be7-c3af7bb3d079"
Compressing files in "C:\MyInstaller"
 C:\MyInstaller\MySoftware.msi (MySoftware.msi)
 MySoftware.msi - 15.8MB
Embedding banner "C:\myInstaller\Mybanner.bmp"
Embedding configuration "C:\MyInstaller\configuration.xml"
Embedding CABs
 SETUP_MY_SOFTWARE_1.CAB - 15.5MB
Embedding CAB directory
Writing 15.8MB
Cleaning up "C:\Users\gap\AppData\Local\Temp\72b166f0-74a7-49af-8be7-c3af7bb3d079"
Successfully created "C:\MyInstaller\setup.exe" (16.6MB)

But, when I run the setup.exe program in this folder, it works, because it can find my MSI file. 
If I move the setup.exe program to another place, it doesn't work, unless I copy my MSI file along
with it.  I am trying to get my MSI embedded, and not having much luck. 

I'm NOT using a SupportFiles folder, because I have no support files.

The first step of the install process is to download DotNetFx35setup.exe from microsoft and run it.
This works - without a problem.  Next, I want to run myInstaller.MSI and setup.exe can't find it.

I have my msi file in the C:\MyInstaller folder.

Here's what my config file looks like:

<?xml version="1.0" encoding="utf-8"?>
<configurations lcid_type="UserExe" show_language_selector="False" language_selector_title="" language_selector_ok="OK" language_selector_cancel="Cancel" configuration_no_match_message="" ui_level="full" fileversion="7.0" productversion="7.0" log_enabled="True" log_file="#APPPATH\dotNetInstallerLog.txt">
  <schema version="1.10.8408.0" generator="dotNetInstaller InstallerEditor" />
  <fileattributes>
    <fileattribute name="CompanyName" value="Group Logic Inc." />
    <fileattribute name="FileDescription" value="MyProgram Installer" />
    <fileattribute name="fileversion" value="7.0" />
    <fileattribute name="productversion" value="7.0" />
    <fileattribute name="LegalCopyright" value="Copyright 2010 Group Logic Inc, Arlington VA USA" />
    <fileattribute name="ProductName" value="Mass Transit SFTP" />
  </fileattributes>
  <configuration dialog_caption="MyProgram Installer" dialog_message="In order to install MyProgram you must first install these components:" dialog_message_uninstall="MyProgram Uninstaller" dialog_bitmap="#APPPATH\Mybanner.bmp" skip_caption="Skip" install_caption="Install" uninstall_caption="Uninstall" cancel_caption="Close" status_installed=" (Installed)" status_notinstalled="" failed_exec_command_continue="Failed to install %s. Continue with others components?" installation_completed="MyProgram installed successfully." uninstallation_completed="MyProgram uninstalled successfully!" installation_none="MyProgram is already installed!" uninstallation_none="MyProgram is not installed!" installing_component_wait="Installing %s. Please wait, this operation could take some time ..." uninstalling_component_wait="Uninstalling %s. Please wait, this operation could take some time ..." reboot_required="To continue the installation you must restart your computer. Restart now?" must_reboot_required="False" dialog_otherinfo_caption="My Website" dialog_otherinfo_link="http://www.mywebsite.com/products/MySoftware/" complete_command="" complete_command_silent="" complete_command_basic="" wait_for_complete_command="True" auto_close_if_installed="True" auto_close_on_error="False" allow_continue_on_error="True" dialog_show_installed="True" dialog_show_uninstalled="True" dialog_show_required="True" cab_dialog_message="%s" cab_cancelled_message="" cab_dialog_caption="" cab_path="#TEMPPATH\#GUID" cab_path_autodelete="True" dialog_default_button="cancel" dialog_position="" dialog_components_list_position="" dialog_message_position="" dialog_bitmap_position="" dialog_otherinfo_link_position="" dialog_osinfo_position="" dialog_install_button_position="" dialog_cancel_button_position="" dialog_skip_button_position="" auto_start="False" auto_continue_on_reboot="True" reboot_cmd="" show_progress_dialog="True" show_cab_dialog="True" type="install" lcid_filter="" language_id="" language="" os_filter="" os_filter_min="winXPsp3" os_filter_max="" processor_architecture_filter="" supports_install="True" supports_uninstall="True">
    <component command="&quot;#TEMPPATH\dotnet35SP1\dotnetfx35setup.exe&quot;" command_silent="" command_basic="" uninstall_command="" uninstall_command_silent="" uninstall_command_basic="" returncodes_success="" returncodes_reboot="" id=".NET 3.5 with SP1" display_name=".NET 3.5 with SP1" uninstall_display_name="" os_filter="" os_filter_min="" os_filter_max="" 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_install="True" required_uninstall="True" selected_install="True" selected_uninstall="True" note="English - WebSetup - dot net 3.5 SP1" processor_architecture_filter="" status_installed="" status_notinstalled="" supports_install="True" supports_uninstall="False" show_progress_dialog="True" show_cab_dialog="True">
      <downloaddialog dialog_caption=".NET 3.5 with SP1 - x86 english - Download Components" dialog_message="Press 'Start' to download the required components for installing .NET 3.5" dialog_message_downloading="Download in progress. Please wait..." dialog_message_copying="Copying ..." dialog_message_connecting="Connecting ..." dialog_message_sendingrequest="Sending request ..." autostartdownload="True" buttonstart_caption="Start" buttoncancel_caption="Cancel">
        <download componentname=".NET 3.5 with Service Pack 1" sourceurl="http://go.microsoft.com/fwlink/?linkid=118076" sourcepath="" destinationpath="#TEMPPATH\dotnet35SP1" destinationfilename="dotnetfx35setup.exe" alwaysdownload="True" clear_cache="True" />
      </downloaddialog>
      <installedcheck path="SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.5" fieldname="Version" fieldvalue="3.5.21022.08" defaultvalue="False" fieldtype="REG_SZ" comparison="version" rootkey="HKEY_LOCAL_MACHINE" wowoption="NONE" type="check_registry_value" description="Installed Check" />
    </component>
    <component package="#TEMPPATH\MySoftware.msi" cmdparameters="" cmdparameters_silent="/qn" cmdparameters_basic="/qb-" uninstall_package="" uninstall_cmdparameters="/qb-" uninstall_cmdparameters_silent="/qn" uninstall_cmdparameters_basic="/qb-" id="MyProgram" display_name="MyProgram" uninstall_display_name="MyProgram" os_filter="" os_filter_min="" os_filter_max="" os_filter_lcid="" type="msi" installcompletemessage="" uninstallcompletemessage="" mustreboot="False" reboot_required="" must_reboot_required="False" failed_exec_command_continue="" allow_continue_on_error="True" required_install="True" required_uninstall="False" selected_install="True" selected_uninstall="True" note="" processor_architecture_filter="" status_installed="" status_notinstalled="" supports_install="True" supports_uninstall="True" show_progress_dialog="True" show_cab_dialog="True">
      <embedfile sourcefilepath="#APPPATH\MySoftware.msi" targetfilepath="" />
    </component>
  </configuration>
</configurations>

I have, on one of the last lines in the file, the most recent guess as to what I should put there for the component package:
      <embedfile sourcefilepath="#APPPATH\MySoftware.msi" targetfilepath=".\" />

Should I even use this field in the editor, and if so, what should targetfilepath be? 

It might also be useful to note that if I put the MSI file in the same folder as the setup program, this installs correctly.

Thanks

Coordinator
Jun 1, 2010 at 9:05 PM

The embedding is working.

Compressing files in "C:\MyInstaller"
 C:\MyInstaller\MySoftware.msi (MySoftware.msi)
 MySoftware.msi - 15.8MB

But the component is declared as <component package="#TEMPPATH\MySoftware.msi", which means it will try to get #TEMPPATH\MySoftware.msi and execut it, which will fail. CAB extraction goes to #CABPATH, not #TEMPPATH, I think changing that lone will do it.

Jun 1, 2010 at 11:07 PM

I love you, man.

Thanks!  That did it!

Coordinator
Jun 2, 2010 at 4:21 PM
No problem. You can thank me by donating a few bucks to your favorite charity :)