Support Portal

Welcome, Guest Login

Support Center

How to Clear Disk Readonly Attribute

Last Updated: Jul 17, 2017 04:05PM PDT

Applies to...

  • DxConsole
  • Sanbolic Melio

Summary

In order to have a valid disk to be managed by Melio, the disk's readonly attribute must be turned off. This can get messy when you have many disks to reset.

Information

The following script can be used to quickly clear readonly attribute for all disks on the system. Just save the script as clear_readonly.cmd and execute it as Administrator.

@echo off
::script list disk file
echo list disk >ldisk.txt
::get disks
diskpart /s ldisk.txt >disks.txt

setlocal
for /f "tokens=1,2,3 skip=8" %%i in (disks.txt) do call :Execute %%i %%j %%k
diskpart /s sdisk.txt >result.txt
notepad result.txt
goto END

:Execute
if NOT "%3" == "No" (
     echo select disk %2 >>sdisk.txt
     echo attrib disk clear readonly >>sdisk.txt
)
goto :eof

:END
endlocal

Contact Us

support.desk@dh2i.com
http://assets0.desk.com/
false
desk
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
false
Invalid characters found
/customer/en/portal/articles/autocomplete