How Do I Prevent Files In Usb From Being Copied Or Deleted Using C#.

Kailash Sahu 141 Reputation points
2021-11-03T08:19:28.857+00:00

I want to develop an windows application which restrict users to copy media files from USB (be it mp3,mp4, etc.) based on password protection. user can only play media files and can't copy or delete. please suggest me some solution with example if possible...

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,277 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Bruce (SqlWork.com) 56,686 Reputation points
    2021-11-04T14:48:59.65+00:00

    As suggested, you can not prevent copying usb files unless you create your own usb file format. You do this by using a raw read/write usb library. In this case you will also need to supply you own player because standard players can not read the files.

    The other more common approach is to encrypt the files with DRM. If you can stream rather than use usb look at

    https://learn.microsoft.com/en-us/azure/media-services/latest/drm-content-protection-concept


  2. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more