开发者

How to attach a datafile to a windows app installation

I'm writing a windows application in c#,FW3.5 & Visual Studio 2008. I need to attach one or more datafiles t开发者_运维问答o 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.


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.


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.


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!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜