如何将笔式驱动器更改为只读 [英] How to change Pen Drive to Read Only

查看:132
本文介绍了如何将笔式驱动器更改为只读的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我需要在Windows中将整个笔式驱动器的内存更改为C语言的只读".我们可以通过更新注册表值来完成此操作,即在下面的注册表路径中将WriteProtect值从0更改为1,
HKEY_LOCAL_MACHINE \\ SYSTEM \\ CurrentControlSet \\ Control \\ StorageDevicePolicies.

但是,如果我这样做,它将为插入计算机的所有笔式驱动器更新,而且我必须在任何地方更改计算机注册表设置,然后将笔驱动器插入计算机.是否可以通过更改笔驱动器设置或笔驱动器的MBR结构或任何其他方式将笔驱动器设置为只读".

请帮助我.

谢谢&问候
Mohan

Hi,
I need to change entire pen drive memory as Read Only in C language in Windows. We can done this by updating the registry value, i.e by changing the WriteProtect value from 0 to 1 in the below registry path,
HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\StorageDevicePolicies.

But if I do like this, it will update for all the pen drive which are plugged in the computer and also I have to change the computer registry setting where ever I go and plugged the pen drive in the computer. Is there any way to make the pen drive as Read Only by changing either the pen drive settings or MBR structure of the pen drive or any other way.

Please help me from this.

Thanks & Regards
Mohan

推荐答案

Mohanraj,

您可以在中断处理的帮助下执行此操作.

Int 21/AH = 40h,

Int 21/AH = 40h,用于写磁盘操作.通过使用此功能,您可以制作一个将pendrive插入系统后将执行的exe文件,该文件将处理磁盘的写操作中断.
Hi Mohanraj,

You can do this with help of intrrupt handling.

Int 21/AH=40h,

Int 21/AH=40h, is for Write disk operation. By using this you can make one exe that will execute on after insertion of pendrive into system and that will handle the write operation intrrupt of your disk.


这篇关于如何将笔式驱动器更改为只读的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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