We all
have faced usb drives infected with viruses and therefore damaged files where
important things might have been lost.The good news is that we can do something
to prevent these kinds of cases from happening to us.There are two methods that
prevent a usb drive from getting infected.The first method is a to buy a usb
drive that has a physical switch which makes it possible to activate
write-protection.And what that does is it closes the system from writing or
making changes to the files that are contained in the drive.And the second
method is very similar but it is implemented in software means.Follow me step
by step because I am going to demonstrate it.
Now
that you have selected your usb drive you are ready type in the last command
which will make your usb drive non-writable.Type in this command : attributes disk set readonly
How To Remove:
Open
“Run” either by typing Win Key + R keys or by going through the Start menu.
Once Run
is opened then type in : diskpart
and then
press Enter.
You will
be presented with a black window which is the program whose name you typed in
before ,Diskpart.
What this
program ( Diskpart ) does is create partitions,modify partitions,delete
partitions,change their attributes,etc.
So it
this program which is going to make your usb drive write-protected.
Now we
need to type a command that will show us the hard drives and usb flash drives
that are present in the computer.And that command is : list
disk
Type in the command and then press Enter.The result you will get will be
similar to the window below.
We need
to find the corresponding disk number for our flash drive.In my case I know
that my usb drive is disk number 2 because I know that its capacity is 8GB ( or
7633 MB ) as is shown in the Size column in the image above.
Now that
we know the disk number we need to type in another command that will select our
flash drive in order to make it active for further operations.
NOW BE
CAREFUL : You should see clearly which disk number your flash drive is because
if you select the number of another drive like your currently operating hard
disk it may result in problems.
Now type
in the following command : select disk x
(where x
is the disk number of flash drive ,yours may be 3 or 5 or whatever).
You will
be greeted with a result as below.
Now you
can go on and try to copy something into the usb drive and see if it will allow
you to do so. Once you try that you will get an error like below :
How To Remove:
Now the
question is how to remove the write-protection attribute so that you are
allowed to copy files into the usb drive.
And the
answer is this command : attributes disk clear readonly
Once you
type in that command you will be freely allowed to copy anything into the usb
drive.


0 comments:
Post a Comment