如何更改文件权限 [英] How to change file permissions

查看:69
本文介绍了如何更改文件权限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个Windows服务,用作提醒服务.

我已创建它来研究如何在C#中创建Windows服务?

在此服务中,我使用一个xml文件来记录提醒,并且在安装服务时会安装此xml文件.

该服务在win xp上很好用.

但是,当我将其安装在VISTA或WINDOWS 7上时,由于权限设置,我无法编辑xml文件.

所以任何人都可以告诉我如何在安装时更改该权限.

I have created a windows service, that use as a reminder service.

I have created it to study How windows service is created in c#?

In this service I use one xml file to keep record of reminders and this xml file get installed when service is installled.

This service is work on win xp very well.

But when I installed it on VISTA or WINDOWS 7, I cant edit the xml file because of permission setting.

so can any one tell me how to change that permission while installation.

推荐答案

希望 ^ ]将为您提供一个想法.
Hope this[^] will give you an idea.


或者,您可以将 XML 文件存储在不需要管理的位置特权来写.
这个 [
Alternatively, you can store your XML file in location that will not request administrative privileges to write in it.
This[^] MSDN article could give you an idea where to store your file.


这篇关于如何更改文件权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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