FileIOPermissions-阻止对目录的写访问 [英] FileIOPermissions - Preventing write access to a directory

查看:133
本文介绍了FileIOPermissions-阻止对目录的写访问的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在研究一个项目,该项目将阻止在将USB闪存驱动器插入计算机时对其进行写访问.我已经研究过使用FileIOPermission类使程序集具有只读访问权限,但是使用该类会阻止其他应用程序写入驱动器吗?
我还从本文 [ ^ ],但这将阻止对所有USB设备的写访问.

I''m currently working on a project that would prevent write access to a usb flash drive when it''s inserted into a machine. I''ve looked into using the FileIOPermission class to make the assembly have read-only access, but would using that class prevent other applications from writing to the drive?
I''ve also looked at editing the registry from this article[^], but that would prevent write access to all usb devices.

Is there a way to prevent write access to one usb device?

推荐答案

首先想到的是使用可以进行密码保护的USB闪存驱动器. .该公司声称其密码保护软件是免费的:[ ^ ],但我有没用过.

此CP文章可能对您有所帮助:用C#开发USB存储设备保护工具,作者:Ozcan ILIKHAN | 2009年6月5日:" [
The first thought that comes to mind is using a USB flash-drive that can be password-protected. This company claims its password-protection software is free: [^], but I have never used it.

This CP article may be helpful as a starting point: "Developing a USB Storage Device Protection Tool with C# By Ozcan ILIKHAN | 5 Jun 2009:" [^].

But, it does show techniques for write-protecting all USB drives, not a specific one.

See discussion here: [^] for other ideas. And discussions on SO here:[^].


这篇关于FileIOPermissions-阻止对目录的写访问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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