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