04 March 2008 Categorized under Uncategorized

Prevent copying of files to USB drive

There are times when you want to prevent others from copying your data but you still need them to be able to view it on your computer. The following tip will help you do exactly that.

As always it is the registry that comes to your rescue. Open the Registry Editor by typing regedit in RUN (WIN+R) dialog (). Go to th key

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\
StorageDevicePolicies

Protect files from being copied to USB device, registry key

Create a new DWORD named WriteProtect (Right Click on right pane and select New»DWORD). Edit the value and make it 1. Just restart Windows explorer and you are done. Next time somebody tries to copy data to the external storage device they will see

Can't copy to Mass storage device error

If you need to copy something just make the stored value of WriteProtect to 0

**Tips : to restart Windows Explorer take Shutdown. Click Cancel while holding down SHIFT+CTRL+ALT, this will close Windows Explorer. Now take TASK MANAGER by pressing ALT+CTRL+DEL take File>>New Task>> [ explorer ] and press Enter. **


Some related articles you may like :

  1. View system files (super hidden) in Explorer
    This is the first among a series of posts on administering Windows . It starts with how to see the files and folders that were...
  2. How to prevent access to select drives using Registry
    You can disable access to select drives for a user using the Registry. Create a REG_DWORD value named NoViewOnDrive under HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion \Policies\Explorer and enter its...
  3. Prevent system slowdown due to large Host file
    A large host file can slow down your system significantly as said in the . This is mainly notable in W2000/XP. Windows 98 and ME...
  4. How to delete undeletable files
    This is a simple tool to delete files Windows would not allow you to delete. This will do the work most of the time. If...
  5. Clear the most recently run commands in Run Box from Registry
    Windows has got the habit of saving almost anything you got your hands on, like recent run list, , recent files etc.. Although some of...
  6. Correction to the list files and folders from a directory to a file
    I think you all remember OKTHEN, the one who told us all an easy way to list files and folders in a directory into a...

27 Responses to “Prevent copying of files to USB drive”

  1. vishwa says:

    You helped me a lot through this code, Could you please tell me the thing that how can i prevent copy even from the USB.

    Thnx

  2. Ajith says:

    Hi Vishwa,
    as far as data copying is concerned I cannot tell any specific ways. The only thing practical is disable USB from hardware manager. Or there is an option to disable drives from registry. Please read this to know how to prevent access to drives in Registry.

  3. Anand says:

    Hi, this key works fine in XP PRO, but how do i make this work in windows2000 professional

  4. Ajith says:

    Hi Anand,
    thanks for the comment. I haven’t seen a system with Windows 2000 in ages since I am a student. So I do not have a clear cut solution.
    Although I tried searching.. I couldn’t find it.
    But, I will try to get you an answer by this week. So don’t be disappointed.
    BTW please try the following method I had posted earlier.
    Setting Access permission to folders in Windows – Linux style

  5. Anand says:

    Hi Ajith,

    Thanks for the quick reply, i will await your response with respect to win2k tweaking.

    Regards, Anand

  6. S Anand says:

    Hello Ajith: Any good news!

  7. Ajith says:

    Hi Anand..
    Good news and bad news..

    I found a way.. but I couldn’t try it on any Win 2000 system..

    The method is through management of removable devices.. I will post about it tomorrow..

  8. S Anand says:

    Hi Ajith:

    any Luck?

  9. S Anand says:

    Hi Ajith: Just following on the Win2K disabling?

  10. S Anand says:

    Dear Ajith: Any Luck? Tried few tricks it did not work.

    Regards, Anand

  11. Ajith says:

    Well Anand it is real hard to find out something for 2000. I couldn’t even get my hands on one 2000 machine yet… sorry

  12. rajat says:

    ajith,you are supercool mate.My problem is that somebody has restricted copying of files from my dvd drive and from usb drives.please help me .

  13. Ajith says:

    Hi Rajat.. ;) Can you send me some screen shots of errors shown when you try to sopy something from USB. Send them to ajithonly at gmail.com

  14. G.O says:

    any lock on vista (no pun intended); should work tho’ since vista is just an XP SP4 – my hdd is basically a server for all the lazy guys who come to rip me off my hard day’s job downloading all kinds of stuff.

  15. G.O says:

    can we apply this to individual folders?

  16. Ajith says:

    Hi G O please try the method mentioned here

    http://www.exnol.com/windows/get-access-to-all-folders-in-windows-like-linux

    You can also use this method to prevent access to a folder… Please contact me if you have any problem with this method

  17. Ajith says:

    Please put your real email if you like to get replies to your mail also

  18. Hector says:

    Hi.. I have Windows XP but when I open the Registry Editor cannot find the StorageDevicePolicies folder; although the others (e.g. system resources) are shown. Any comments on how to avoid someone to copy my files to a DVD and/or USB? ..
    Thanks…

  19. Ajith says:

    Hector,

    you can create these Keys on your own. Also try creating the key under HKCU instead of HKLM

  20. jon2xflash says:

    thanks you helped me alot. god bless you
    i have solved my problem with my roommate that keeps copying my privatefile from my machine

  21. Ajith says:

    Hi Jo2xflash,

    thanks for coming to my blog. Please subscribe to the full RSS feed [http://www.exnol.com/feed] so that you can read the future posts right at your desktop.

  22. Roger says:

    Hi Ajith,

    This will prevent people from copying files from HDD to USB. But can files from USB be copied to HDD?

    And is there anyway that you know of that prevents people from copying a certain files only (only allows them to view from the pc).

  23. Ajith says:

    Hi Roger,
    The files from USB can be copied to the HDD. The second thing can’t exactly be done using the default XP utilities. yOu might need some other software to do so. Because you can lock reading a file. And copying is similar to reading.

  24. Sandy says:

    Hi,

    i would like to know if this works in vista, because I tried it and I don’t know if I did something wrong or if It doesn’t work in vista.
    Thank you for your time

  25. Ajith says:

    I’ll check soon and reply.

  26. Iqbal says:

    Hi Ajith, think your amazing mate! My problem is that I want to try this in Windows 7, will the instructions you gave still be the same? Thank you.

  27. Ajith says:

    Hi Iqbal,
    Thanks a lot for visiting my blog man. I have tries the above mentioned trick on Vista and seems to work. So it would probably work with Windows7. Also there is an application named “Prevent” that can be used to prevent copying to USB drives. It works with Win7. I haven’t used the application. I will test the trick on Win7 in a couple of days and leave you a reply.

Leave a Reply