程序文件夹只读 [英] Program folder read only

查看:88
本文介绍了程序文件夹只读的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的程序的程序文件夹只能在win7 64位版本中读取。

如何克服这个问题。



如何创建.bat文件到



给每个人写一个特定文件夹的权限。





使用.bat文件安装AccessDatabaseEngine_X64.exe / passive

解决方案

程序文件夹是否恰好位于程序文件或程序文件中( x86)目录?



您应该将数据存储在Application Data特殊目录中,而不是存储在程序文件目录中。这个目录专门用于写入/读取数据。程序文件目录不是可读/写的,使它们可读/写是个坏主意。此外,您不应更改文件夹权限以使您的软件正常工作。


请参阅我对该问题的评论。如果问题是UAC,未经您明确同意,任何程序或批处理都无法获取权限。事实并非如此,这意味着用户帐户控制无用。但这并非毫无用处。如果您的用户帐户没有文件系统对象的必需权限,则需要拥有具有管理权限的帐户。这还不够。此外,您应该使用提升权限,以管理员身份运行相关批处理或应用程序。请参阅:

http://en.wikipedia.org/wiki/User_Account_Control [< a href =http://en.wikipedia.org/wiki/User_Account_Controltarget =_ blanktitle =New Window> ^ ],

http://www.sevenforums.com/tutorials/11841-run-administrator.html [ ^ ]。



我不相信这个问题是旧的主要过时的只读属性(通过查看属性来检查),但如果是,那么,无论如何,在批处理文件中你需要 attrib 命令: http://technet.microsoft.com/en-us/library /bb490868.aspx [ ^ ]。



-SA


BBORA问:

如何进行设置将数据存储在应用程序数据特殊目录中

请参阅我以前的答案:如何找到我的程序目录当前目录,特殊文件夹



-SA

program folder of my program become read only in win7 64 bit version.
how to overcome this problem.

how to create .bat file to

give everyone write permission to a particular folder.
and

install "AccessDatabaseEngine_X64.exe /passive" using .bat file

解决方案

Is the "program folder" happen to be in the Program Files or Program Files (x86) directory?

You should be storing your data in the Application Data special directory, not in your program file directory. This directory is specifically there for you to write/read data to. The program files directories are not read/write and it is a bad idea to make them read/write. Also, you shouldn't change folder permissions to make your software work.


Please see my comments to the question. If the issue is UAC, no program or batch can "grab" permissions without your explicit consent. It it wasn't so, it would mean that the User Account Control is useless. But it is not useless. If your user account does not have required permissions for the file system object, you need to have an account with administrative privileges. And this is not enough. Also, you should run the batch or application in question using elevated permission, "As Administrator". Please see:
http://en.wikipedia.org/wiki/User_Account_Control[^],
http://www.sevenforums.com/tutorials/11841-run-administrator.html[^].

I don't believe the problem is old majorly obsolete "read-only" attribute (check it up by looking at the properties), but if it is, by any chance, in your batch file you need the attrib command: http://technet.microsoft.com/en-us/library/bb490868.aspx[^].

—SA


BBORA asked:

how to make setup to store data in "Application Data special directory"

Please see my past answer: How to find my programs directory (current directory, "special folders").

—SA


这篇关于程序文件夹只读的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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