安装到Common Files .NET中 [英] Installing into Common Files .NET

查看:82
本文介绍了安装到Common Files .NET中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用VB.NET,Visual Studio 2010 ...

我想在安装过程中将文件放在通用文件"中.问题是,完成此操作后,运行我的程序的用户需要是管理员才能访问它,或者我需要手动更改文件的权限,以便普通用户可以访问它.即可访问此文件而无需提升他们的权利.如果我尝试安装到用户的应用程序文件夹,Visual Studio会警告我不要将其安装到用户的配置文件目录中,因为并非每个人都可以使用该文件. .

我应该在用户计算机上的哪个位置安装文件,以便普通用户可以完全访问该文件?谢谢!

---
具体来说,这是一个SQL Server CE数据库文件.用户可以导航到该文件以进行连接,然后查询数据源.问题是,一旦安装,只有管理员才能打开文件,除非我手动更改权限,而且我不希望用户这样做.再次感谢!

Using VB.NET, Visual Studio 2010...

I''d like to put a file in Common Files during installation. The problem is that once this is done the user running my program needs to be an admin to access it or I need to manually change the permissions on the file so regular user''s can access it.. I want regular user''s to be able to access this file without having to elevate their rights. If I try to install to the user''s application folder Visual Studio gives me a warning that I shouldn''t install into the user''s profile directory because not everyone which be able to use the file which makes sense so...

Where would I install a file on a user''s computer which would give regular user''s full access to it? Thanks!

---
Specifically, this is a SQL Server CE database file. The user can navigate to the file to connect and then query the data source. The issue is that once installed only an admin can open the file unless I manually change the permissions and I would not like my user to have to do this. Thanks again!

推荐答案

通常的放置位置是CommonApplicationData文件夹的子文件夹中.然后,您可以根据需要更改该子文件夹的权限,以向Users组提供适当的权限.
The normal place to put this is in a subfolder of the CommonApplicationData folder. You then change the permissions on that subfolder to give the Users group appropriate permissions depending on your requirements.


这篇关于安装到Common Files .NET中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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