3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

USB Lock

USB Lock
I had the need to have a switch to turn read only mode for all my USB sticks (sadly only a old 128Mb one had a hardware switch). The use of SD and microSD cards with a adaptor (they both have a switch) is a option but only if your PC has a card reader. After some research i came up with a plan. And after some testing, and codeing i have made this litlle aplication that fit my needs.
 
Remove these adsRemove these ads by Signing Up
 

Step 1How it does what it does ?

It sets in the registry a dword value to 1 for "Read-Only Mode" and 0 for "Read-Write Mode".

Path:
HKEY_LOCAL_MACHINE -> SYSTEM -> CurrentControlSet -> Control -> StorageDevicePolicies

Key
WriteProtect=1 or 0

I have added 2 registry files that enable or disable that, for learnig purpose.
« Previous StepDownload PDFView All StepsNext Step »
3 comments
Aug 30, 2011. 3:56 AMac1D says:
Nice idea!
Here a little improvement that MAY work.
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\UsbStor
Set this value to 4 to desactivate usb drive, then to 3 to activate again.

So, you could modify your app to:
Read only mode:
1) set to read-only
2) desactivate usb device (act like unplug)
3) activate usb device (act like re-plugging)
4) profit!

Normal mode:
1) set to normal mode (read/write)
2) desactivate usb device (act like unplug)
3) activate usb device (act like re-plugging)
4) profit!

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
2
Followers
7
Author:neumanngregor