[英]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. 我正在使用Visual Studio 2008-如果要在其中包含文件,则可以访问许多特殊文件夹。 One I don't see on the list is the user's local application data folder.
我在列表中没有看到的一个是用户的本地应用程序数据文件夹。 Is there anyway to put files in that folder from within a VS2008 setup project?
无论如何,是否可以将文件从VS2008安装项目中放入该文件夹中?
When I was facing similar challenge, I made it so: 当我面临类似的挑战时,我做到了:
Created a class library auxiliary project. 创建了一个类库辅助项目。
Added the System.Configuration.Install.dll reference. 添加了System.Configuration.Install.dll参考。
Added a new class inheriting from System.Configuration.Install.Installer 添加了一个新类,继承自System.Configuration.Install.Installer
Wrote an override of the Install method to copy the files 写了Install方法的替代来复制文件
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. 在“自定义操作”(“安装”组)中,从“应用程序”文件夹中选择了辅助项目输出。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.