The lock can be opened and closed by single command in cmd.
Insert your drive and give the chdir command to locate your hard drive. Then type sys: on to enable the write protection and sys: off to disable the write protection service.
Also see your bios settings. Some bios have write protection settings. If it is enable then you have to disable it from there.