views:

430

answers:

5

Hi

I'd like to wrap a bunch of files (an .exe a .xml, some images) in 1 executable package. When the user launches this executable package the .exe included in this executable package should run. Is this possible in the first place on the windows platform?

What I'm not looking for is a self extracting zip or an installer because both of them actually move the new files to the harddisk.

Why do I want this? I want the user to have just one file so that it is easily distributed.

Thanks in advance

Bart

+1  A: 

You can attach anything you want to the end of an executable just fine. What I used to do is attach my files then an int saying how long my payload was so that (psuedo):

payload.size = readInteger(exe.size - sizeof(int))
payload.offset = exe.size - sizeof(int) - payload.size
Lloyd
+2  A: 

Is there any reason you couldn't use embedded resources for your XML/image files?

Rowland Shaw
A: 

Three approaches you may want: if you need to bundle only images/audio and other non-executable files (no DLLs, no OCX etc) then you can look up information on resource files; you're not limited to the types listed in the article linked, but for those there're specific helpers. Otherwise - if you want to bundle executable files as well or prefer a more straightforward solution - you may consider using thinstall or molebox

emaster70
A: 

It's certainly possible. The Tcl language has the ability to be bundled as a "starpack" which is an executable with an embedded virtual filesystem. In that filesystem you can embed xml, images, sounds, scripts, etc. Tcl'ers have been doing the single-file-deploy thing for years.

Bryan Oakley
A: 

Hi Guys

Thanks for your answers. I have to admit that I'm not an application developer so this is all a bit new to me. I'm actually a Flash developer. I'd like to be a bit more specific and explain you guys what I'm actually trying to do:

I developed the following files:

  • viewer.exe (a flash standalone viewer, normally this is a compiled .swf, but this file type does need a browser-plugin-player to show itself. The stand alone version doesn't)
  • content.xml
  • images folder with different kinds of images

The viewer.exe loads the content.xml, builts a presentation using the defined content in the content.xml (with links to different images in the images folder).

My client doesn't really like the complete structure with all the different files because it isn't easy to distribute those files. So I'm trying to 'wrap' all the files in one .exe or something else :)

I hope I'm a little bit more clear.

If one of your solutions can still create this kind of package, please feel free to correct and educate me :)

Bart