I just want to make my pendrive write protected just to make sure, when I insert it public PCs like in cyber cafes in order to just read the files, it doesn't get virus affected. How can I do this?
You could always try locking the drive using diskpart.
Open CMD as admin and type
When diskpart loads - type
This will give you a list of drives in your machine.
Select your USB device using the
select disk 1 command (where 1 is the number of your USB)
attributes disk set readonly to set the drive as read only.
Unless your USB drive has a physical switch, this is not possible. You cannot enforce something like this using a software solution, especially when you do not control the system.
If your stick uses the NTFS filesystem, you can do the following. If not, consider copying the files off of the drive, then format as NTFS.
Do the following:
- Open your explorer and select the driveletter of your USB drive.\
- Right click and select
- Open the tab Security
- Click the
Changebutton, and answer yes to the UAC prompt if applicable.
- Look if there's an Everyone user. It is likely not there. If it is, skip step 8.
- Click on Add...
- Type in
Everyoneand click Ok
- Select the Everyone user
- Set a checkmark in the column
From this moment on, no one can change the drive anymore. If you want to make changes, Repeat the above steps and remove the checkbox for write in the
Although the screenshot is dutch, it is showing the endresult.