Need help to create Single Executable Package

Oct 29, 2010 at 12:04 PM

Hey, i'm trying to create a .msi that consists my project .msi and gtk# installer. gtk# is required to run my program. As far as i understand i need to follow "Building a Single Executable Package" tutorial from the help file. So is gtk# .msi an embed file? Also, what is #CABPATH? Can someone explain me? or is there a simpler tut somewhere(i haven't found!)

Thanks in advance.

Oct 29, 2010 at 12:21 PM

There're a couple of tutorials that might be helpful.

The gtk#.msi needs to be added as an embed file.

#CABPATH is the location where all embed files will be extracted when the installer runs (by default a temporary folder on the machine).

Oct 29, 2010 at 12:45 PM

Thanks dblock for the reply. How about my program msi? is that embed file too? should i add it as a msi component or as an embed file?

Oct 29, 2010 at 1:09 PM

Yes. You should add your program as an MSI component and an embed file underneath. Components are things that are installed and need proper installed checks. Embed files are just files added to the bootstrapper package.

Oct 29, 2010 at 1:23 PM
Edited Oct 29, 2010 at 1:33 PM

Ok, i've managed to create my first .msi which contains .msi component(my project msi) and a embed file(gtk#.msi).

When i start installing, it first says: "In order to install APPLICATION_NAME you must first install  these components:" Under that there is a listbox, which is empty. OK, i press Install. Then is starts installing and after a second or two pops up: "Error extracting 'SETUP_1.CAB': Failure writing to target file.

Oct 29, 2010 at 1:50 PM
Edited Oct 29, 2010 at 1:56 PM

when i run

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

command, then the output doesn't show myProgram.msi.


Here is my configuration.xml


<?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="" productversion="" log_enabled="False" log_file="#TEMPPATH\dotNetInstallerLog.txt">
  <schema version="1.10.1525.0" generator="dotNetInstaller InstallerEditor" />
  <configuration dialog_caption="PosSystem Installer" dialog_message="In order to install PosProject you must first install these components:" dialog_message_uninstall="" dialog_bitmap="#APPPATH\banner.bmp" skip_caption="Skip" install_caption="Install" uninstall_caption="Uninstall" cancel_caption="Close" status_installed=" (Installed)"    >
    <embedfile sourcefilepath="C:\Users\peace\Desktop\gtk-sharp-2.12.10.win32.msi" targetfilepath="#CABPATH" />
    <component package="#APPPATH\SampleFirst.msi" cmdparameters="" cmdparameters_silent="/qn" cmdparameters_basic="/qb-" uninstall_package="" uninstall_cmdparameters="/qb-" uninstall_cmdparameters_silent="/qn" uninstall_cmdparameters_basic="/qb-" id="1" display_name="PosProject.msi" uninstall_display_name="" os_filter="" os_filter_min="" os_filter_max="" os_filter_lcid="" type="msi" installcompletemessage="" uninstallcompletemessage="" mustreboot="False" reboot_required="" must_reboot_required="False" />


Oct 29, 2010 at 2:04 PM

Instead of making this an interactive session, why don't you spend a bit more time trying things and looking at sample configurations?

Here're the issues in your configuration that I see:

  • targetfilepath is a full path, not a directory, eg. "#CABPATH\gtk-sharp.msi"
  • since gtk is a pre-requisite, it shoud be a component and its embedfile should be a child of it
  • all your components need proper installed checks to tell the bootstrapper whether the component is installed or not