在安装项目中指定 c:\ProgramData 文件夹? [英] Specifying c:\ProgramData folder in Setup project?

查看:61
本文介绍了在安装项目中指定 c:\ProgramData 文件夹?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 VS 2010 中使用 Windows Installer 部署项目来为小型演示项目创建安装程序.该演示需要安装 SQL Compact 数据库文件 (MyData.sdf).该演示无法将数据库安装到用户计算机上的应用程序文件夹中——如果我这样做,我会收到访问被拒绝"错误.因此,安装数据库的逻辑位置似乎是用户 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.

如何在部署项目的文件系统编辑器中指定 c:\ProgramData 文件夹?我右键单击 File System on Target Machine 节点并将鼠标悬停在 Add Special Folder 上以查看特殊文件夹的弹出列表,但我没有看到特殊文件夹看起来与 c:\ProgramData 文件夹相对应的文件夹.

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.

推荐答案

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

这篇关于在安装项目中指定 c:\ProgramData 文件夹?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆