Modify the registry under the Windows command line

  
 

reg add "HKLM\\system\\currentcontrolset\\control\\storagedevicepolicies" /v writeprotect /t reg_dword /d 1 /f/v Set the key name (value) /t Set the data type (type) /d set the added value (data)/f means mandatory (forbidden)

Copyright © Windows knowledge All Rights Reserved