page 1 of 1
Comments: 1 | Views: 541
Hi,

I asked this question (which I thought was a pretty basic question) over at the MSDN forums but didn't get any response.  Maybe someone over here can be more helpful...

I have a VS 2005 C# project that I install using a Setup Project in VS 2005 (MSI installer). I need to create a folder within my app's install folder that contains many hundreds of smaller files, organized in subfolders.  These files are not part of any build process. I want to tell the installer project to deploy all of the contained files (including subfolders) during the install (and remove them during uninstall). So far the only way I found to do this is to manually add every single file to the installer project.  This is very time consuming, and files can be added/removed at various times during the app developement cycle, so this is very error-prone as I might miss some files.

So how do I tell the installer to include the folder, and automatically include all contained files/subfolders?  It would be OK to create one zipped file beforehand, and let the installer unzip it at install time into the correct folder, but my initial search on how to do this basically ended when I found that there are licensing issues with zipped files, and it is just something I don't want to get into.  What about a cab file? Would that be possible?  Sorry, I am rather new at using Setup Projects.

Thanks in advance for any help with this.
figuerres
figuerres
???
well as of .net 2.0 (and later) there is a built in compression and de-compression class you might use.
it's not a full zip-file system but does let you compress a stream, from that you could hack up a solution for your package.

or you could check out:
http://www.sharpziplib.com/

or
http://blogs.msdn.com/dotnetinterop/archive/2006/04/05/.NET-System.IO.Compression-and-zip-files.aspx
the current files etc... are at:
http://www.codeplex.com/DotNetZip

the blog metions the licensing question you have.
that should help you see that you are ok.

you may also want to look at the documentation on MS Build as that is what is used behind the sceens to build a VS solution.
you may be able to create a custom build step that takes a folder name and handles it as "Include as content" during the build and makle that a dependency of the setup project.

hope that helps.
page 1 of 1
Comments: 1 | Views: 541
Microsoft Communities