在安装项目中指定 c:\ProgramData 文件夹?
我正在 VS 2010 中使用 Windows Installer 部署项目来为小型演示项目创建安装程序。该演示需要安装 SQL Compact 数据库文件(MyData.sdf)。该演示无法将数据库安装到用户计算机上的应用程序文件夹中——如果这样做,我会收到“访问被拒绝”错误。因此,安装数据库的逻辑位置似乎是用户的 c:\ProgramData 文件夹下的子文件夹。
如何在部署项目的文件系统编辑器中指定 c:\ProgramData 文件夹?我右键单击“目标计算机上的文件系统”节点并将鼠标悬停在“添加特殊文件夹”上以查看特殊文件夹的弹出列表,但我没有看到特殊文件夹看起来与 c:\ProgramData 文件夹相对应的文件夹。
列表中的条目之一是否与该文件夹相对应?我必须将其设置为自定义文件夹吗?如果这样做,我将如何设置自定义文件夹?感谢您的帮助。
I am using a Windows Installer deployment project in VS 2010 to create an installer for a small demo project. The demo needs to install a SQL Compact database file (MyData.sdf). The demo can't install the database to the application folder on the user's machine--I get an "access denied" error if I do that. So, the logical place to install the database would seem to be a subfolder under the user's c:\ProgramData folder.
How do I specify the c:\ProgramData folder in the deployment project's File System Editor? I right-click the File System on Target Machine node and hover over Add Special Folder to see the fly-out list of special folders, but I don't see a special folder that looks like it corresponds to the c:\ProgramData folder.
Does one of the entries on the list correspond to the folder? Do I have to set it up as a custom folder? If I do, how would I set up the custom folder? Thanks for your help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不认为它可以在飞行中使用。您可以创建自定义文件夹并将其
DefaultLocation
属性设置为[CommonAppDataFolder]
。I don't think it's available in the fly-out. You can create Custom Folder and set its
DefaultLocation
property to[CommonAppDataFolder]
.