drive: Specifies the drive that needs to be locked.
drive: Specifies the drive that needs to be unlocked.
Lock the C: drive
When typing the above command you will receive the below prompt.
WARNING: The LOCK command enables direct access by programs
that can CORRUPT file names and/or DESTROY disk data, resulting in the
loss of files on your disk.
Are you sure (Y/N)?
Unlock the C: drive
It is important to know that if errors occur indicating that a process, such as fdisk or a setup of a new program or operating system, cannot continue because the hard disk drive is locked, that using the unlock command will resolve this issue.