How to Prevent Others from Copying Files from a USB drive?

Learn how to secure your data on a usb drive by preventing unauthorized copying with simple Windows registry changes. Protect your files today!
How to Prevent Others from Copying Files from a U-Disk

Table of Contents

Have you ever wondered how to safeguard your important data from being copied when you plug a U-disk into your computer? We all know that the ease of copying data from a computer using a U-disk can be a potential security risk. In this guide, we’ll walk you through a simple yet effective method to prevent unauthorized file copying from your computer.

Step 1: Access the Registry

The first step to prevent unauthorized copying is to access your computer’s registry. To do this, follow these simple steps:

  1. Open the Start menu.
  2. Choose the “Run” option.

Step 2: Open the Registry Editor

In the “Run” dialog box, type ‘regedit’ and click the OK button to open the Registry Editor.

Step 3: Create StorageDevicePolicies Key

Now, it’s time to create the necessary key to enable this security feature. Navigate to the following registry path: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control.

  1. Right-click on the “Control” key.
  2. Choose “New,” and then select “Key.”
  3. Rename the newly created item to ‘StorageDevicePolicies.’
  4. Select the “StorageDevicePolicies” item.
  5. Right-click and create a new Dword value.
  6. Change the name of this Dword value to ‘WriteProtect.’
  7. Select the “StorageDevicePolicies” item.
  8. Right-click and choose “Export.”

Step 4: Export the Registry File

After selecting “Export,” navigate to the C: drive root directory and save the exported file as ‘yes.reg.’

Step 5: Modify the Registry Value

Next, double-click on the “WriteProtect” value on the right side of the “StorageDevicePolicies” item. Change the value of this Dword to 1; here, 1 represents the prohibition. After changing the value to 1, click the OK button, close the window, and once again right-click on the “StorageDevicePolicies” item, choosing the “Export” option.

Step 6: Save the Exported File

After selecting “Export,” navigate to the C: drive root directory and save the file there. You can choose the location as you like. For convenience, I’m saving it under the C: drive directory and naming it ‘Forbidden.reg.’

Step 7: Create a Batch File

Now, let’s create a batch file to execute the registry changes:

  1. Open the Start menu.
  2. Select “Programs,” then “Accessories.”
  3. Finally, choose the “Notepad” file.

In the opened Notepad file window, enter the command: ‘Echo off Reg import c:\yes.reg.’

Save the file to the C:\WINDOWS\system32 directory and give it the .bat extension. For convenience, I’m naming it ‘yes.bat,’ but you can choose your name.

Step 8: Testing the Security Feature

After completing all of these steps, insert your U-disk into the computer. After trying to copy files, you’ll notice that it no longer allows file copying. If you want to copy files again, you’ll need to remove the U-disk from the computer first.

Step 9: Enabling File Copying Again

If you want to allow U-disk file copying again, simply open the Start menu, choose the Run option, and enter ‘yes.bat.’ That’s how you can enable or disable file copying as needed.

By following these steps, you can enhance the security of your data when using a U-disk with your computer.

Conclusion

Preventing unauthorized file copying from a U-disk is a simple process that involves modifying the Windows registry and creating a batch file. By taking these steps, you can protect your sensitive data from being copied without your permission. Remember to exercise caution when making changes to the registry, as it can impact your system’s functionality if not done correctly.

FAQs

Q1. Is it safe to modify the Windows registry to prevent file copying from a U-disk?

Modifying the registry is generally safe as long as you follow the steps carefully. However, any incorrect changes to the registry can affect your system’s stability, so proceed with caution.

Q2. Can I reverse the changes if I want to allow file copying again from my U-disk?

Yes, you can reverse the changes by running the ‘yes.bat’ file, which will enable file copying from your U-disk.

Q3. Are there other methods to protect data on a U-disk from being copied?

Yes, there are other methods, such as encryption and password protection, which can be used to secure data on a U-disk.

Q4. Can this method be used on all versions of Windows?

This method is primarily applicable to Windows operating systems. The specific steps may vary slightly between different Windows versions.

Q5. Are there any third-party software solutions for preventing file copying from a U-disk?

Yes, there are third-party software applications available that provide similar functionality. These tools may offer more user-friendly options for data protection.

End-of-DiskMFR-blog
DiskMFR Field Sales Manager - Leo

It’s Leo Zhi. He was born on August 1987. Major in Electronic Engineering & Business English, He is an Enthusiastic professional, a responsible person, and computer hardware & software literate. Proficient in NAND flash products for more than 10 years, critical thinking skills, outstanding leadership, excellent Teamwork, and interpersonal skills.  Understanding customer technical queries and issues, providing initial analysis and solutions. If you have any queries, Please feel free to let me know, Thanks

Please let us know what you require, and you will get our reply within 24 hours.









    Our team will answer your inquiries within 24 hours.
    Your information will be kept strictly confidential.

    • Our team will answer your inquiries within 24 hours.
    • Your information will be kept strictly confidential.

    Let's Have A Chat

    Learn How We Served 100+ Global Device Brands with our Products & Get Free Sample!!!

    Email Popup Background 2