锁定驱动器c并且无法在其中创建文件 [英] lock drive c and could not create file in it

查看:136
本文介绍了锁定驱动器c并且无法在其中创建文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

hi
我赢了7

我有一个c#项目必须在驱动器中创建一个文件
但即使在Windows中我也无法创建它。

可能是我的Windows有病毒。

如何在c#中使用命令打开驱动器c的锁定?



非常感谢

hi i have win 7
i have a c# project must create a file in drive c
but even in windows i can't create it.
may be my windows has viruses .
how can i use a command in c# which could open lock of drive c?

thanks very much

推荐答案

假设你的驱动器实际上没有被锁定 - 因为如果它是你不能写任何东西,那就是整个想法,如果你能够轻松地绕过那么它就不会有太大的保护,是不是 - 最可能的原因是你试图写入你没有写入权限的文件夹。在Vista及更高版本中,写访问越来越具有限制性,并且出于安全原因,根本没有对启动驱动器的根目录(通常是C :)的写访问权。



尝试写入安全文件位置;这将为您提供一些关于在哪里编写应该对该文件夹具有写权限的文件的想法:我应该在哪里存储数据? [ ^ ]
Assuming your drive isn't actually locked - because if it is you can't write anything to it, that's the whole idea and if you could get round that easily then it wouldn't be much of a protection, would it - the most likely reason is that you are trying to write in a folder to which you have no write access. In Vista and above, write access is increasingly more restrictive, and there is no write access to the root directory of the boot drive (normally C:) at all for security reasons.

Try writing to a "safe" file location; this will give you some ideas as to where to write files that should have write permissions on the folder: Where should I store my data?[^]


这篇关于锁定驱动器c并且无法在其中创建文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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