views:

22

answers:

3

I'm writing a windows application in c#,FW3.5 & Visual Studio 2008. I need to attach one or more datafiles to the installation.

The requirement is that when the end user installs the application, a folder will be created and the datafile will be put in this folder.

Is there a way to do this by amending the publish settings in Visual Studio or perhaps even do it programmatically?

Thanks for any advice.

Just thought I'd add that it's for a software package shipped to users on a 3,6 or 12 month licence. The company employee(non-programmer) needs to be able to specify the duration of the licence and which datafiles to ship with it before sending. I had tried unsuccessfully to persuade him to do away with the datafiles and just link directly to a database and now i'm stuck.

Thanks again.

A: 

just right-click in your project-view your main-project, select add folder, name that folder like you want, right-click it, select add existing element and choose the file you want to add. Remember to deliver it with your release!

P.S.: This is for VS2008 and 2010! The labels might be namned other, cause I'm using the german language here!

Husky110
+1  A: 

Take a look at creating a Visual Studio Installer project. You can use the wizard to create one based on your current C# project. In the VSI project, you can adjust all sorts of things, including creating folders and publishing files to said folders.

rakuo15
+1  A: 

You can create a setup project .Please refer to http://www.c-sharpcorner.com/UploadFile/vishnuprasad2005/SetupProjects12022005022406AM/SetupProjects.aspx

And then choose the application folder, create your directory and add your files to that folder.

DrakeVN