reg add "HKLM\system\currentcontrolset\control\storagedevicepolicies" /v writeprotect /t reg_dword /d 1 /f

/v 设置键名(value)
/t 设置数据类型(type)
/d 设置添加的值(data)
/f 表示强制(forbidden)