views:

259

answers:

3

I am trying to deploy a bunch of files in a directory in my MSI setup. As the files will change frequently I don't want to add the files directly but rather have a way of automatically including all files from within a directory and deploy them to a certain location.

I am using a Visual Studio Setup Project.

Anybody know how/if this is possible?

A: 

Using what????

WiX? InstallShield? Visual Studio? WISE? InstallAware? MSI Factory? Some other Windows Installer tool?

  • InstallShield - yes. Add a 'dynamic folder' to your setup.
  • WiX - kind of. Use heat to generate (partial) WiX sources before calling candle/light.
sascha
A: 

I did this in NSIS by generating part of my NSIS script in Perl and having a master script which included the dynamic script.

Short answer: it's definitely possible.

antik
+1  A: 

I solved the problem by a workaround:

  • Add a build action of packaging entire directory (could be filtered) to a ZIP file.
  • Add a reference to an empty ZIP file to deployment project.
  • Add a custom action to deployment project to extract the ZIP to destination folder.

It's simple and stable.

how do you zip and unzip it? is there a command or do you need to ship a zip application?
Patrick Klug
The project I worked on, already had reference to ICSharpZipLib under appropriate license, so the C# custom action was really handy in my case.
does it also uninstall these items when you uninstall the application?
Patrick Klug
Sure, during un-installation the whole INSTALLDIR directory with deployed files is been deleted. It was done by other non-related custom action anyway.There is nothing special, because other files like log files are should be deleted too. VS Uninstaller deletes only files deployed by itself nothing more.

related questions