如何防止使用C#复制或删除Usb中的文件... [英] How Do I Prevent Files In Usb From Being Copied Or Deleted Using C#...

查看:114
本文介绍了如何防止使用C#复制或删除Usb中的文件...的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是yogesh夏尔马。我想开发一个Windows应用程序,限制用户根据密码保护从usb(无论是mp3,mp4等)复制媒体文件。用户只能播放媒体文件,不能复制或删除。如果可能的话,请告诉我一些解决方案......

解决方案

你不能做你想做的事。读取文件进行播放与读取文件无异。你无法分辨出来。


我同意其他人分享的内容,但仅仅是为了好奇我尝试搜索这样的软件,这些软件可以保护存储在USB驱动器中的文件并找到以下链接

http://www.kakasoft.com/usb-copy-protect/ how-to.html [ ^ ]

似乎有这样的功能。

我个人会建议你下载试用版并检查它是否真的有效。然后,如果它工作只是抓住它正在做的事情的想法并开始你的发展。



我不认为它将完全受版权保护,但至少是一些可能会有所帮助。



我不确定有多少人会同意你应该继续进行你的想法,因为它似乎并不完全可行,但我如果符合你的实际要求,请自行检查。



谢谢:)


一如既往,CodeProject是你的朋友;这是使用C#保护文件夹的一个例子:[ ^ ]。如果你搜索,我相信你可以找到其他的C#例子。



如果你正在寻找具有各种角色/权限的USB驱动器上的复杂文件系统的等价物/群组等,然后,正如菲利普和谢尔盖评论的那样,你所描述的内容无法有效地完成。我建议你专注于防止你希望保护的文件夹/文件不被写入USB驱动器;没有硬件修改通常是不可能的。



您可以在USB驱动器上创建受保护的文件/文件夹;有各种商业软件,如TrueCrypt(并未使用它mysefl),可用:[ ^ ],但是,付出了努力由一个才华横溢的黑客,这个文件夹可能像大多数计算机文件系统一样不安全。



和一些USB制造商,如金士顿(一个) ,制作具有额外安全功能的USB驱动器:[ ^ ]

hi i am yogesh sharma. i want to develop an windows application which restrict users to copy media files from usb (be it mp3,mp4, etc.) based on password protection. user can only play media files and can't copy or delete. plese suggest me some solution with example if possible...

解决方案

You cannot do what you want. Reading the file for playback is no different from reading it to copy the file. You cannot tell the difference.


I agree about what others have shared but just for curosity I tried searching for such softwares which can protect files stored in a USB drive and and found following link
http://www.kakasoft.com/usb-copy-protect/how-to.html[^]
It seems to be having such features.
I personally would recomend you to download the trial and check if it really works. Then if it works just grab the idea with which it is doing things and start your development.

I don't think it will be completely copy protected but atleast to some extenct it may help.

I am not sure how many people will agree that you should proceed further on your idea as it doesn't seem to be completely feasible but I would say check it yourself if it meets your actual requirement.

thanks :)


As always, CodeProject is your friend; here's one example of using C# to protect a folder: [^]. I am sure you can find other C# examples if you search.

If you are looking for the equivalent of a complex file system on a USB drive with various Roles/Permissions/Groups, etc., then, as Philppe and Sergey commented, what you describe cannot be done, effectively. I suggest you focus on preventing folders/files you wish to protect from every being written to a USB drive; that may often not be possible without hardware modifications.

You can create protected files/folder on a USB drive; there's a variety of commercial software, like TrueCrypt (havne't used it mysefl), available: [^], but, given an effort by a talented "hacker," that folder may be as insecure as most computer file systems are these days.

And, some USB manufacturers, like Kingston (for one), make a USB drives with extra security features: [^].


这篇关于如何防止使用C#复制或删除Usb中的文件...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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