开发者

How can I put files in the user's local application data folder in a setup project?

I'm working with a visual studio 2008 - You get access to a number of special folders to use if you want to include files within. One I don't see on the li开发者_开发问答st is the user's local application data folder. Is there anyway to put files in that folder from within a VS2008 setup project?


When I was facing similar challenge, I made it so:

  • Created a class library auxiliary project.

  • Added the System.Configuration.Install.dll reference.

  • Added a new class inheriting from System.Configuration.Install.Installer

  • Wrote an override of the Install method to copy the files

In the Setup project, targeted the above mentioned project output to the Application folder and -

In Custom actions (Install group) picked the auxiliary project output from the Application folder.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜