在安装项目中指定 c:\ProgramData 文件夹?

发布于 2024-09-19 16:43:35 字数 402 浏览 6 评论 0原文

我正在 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

铜锣湾横着走 2024-09-26 16:43:35

我不认为它可以在飞行中使用。您可以创建自定义文件夹并将其 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].

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文