ver | find "5.0" > NUL &&  goto show60
ver | find "5.1" > NUL &&  goto show60
ver | find "5.2" > NUL &&  goto show60
ver | find "6.0" > NUL &&  goto show60
ver | find "6.1" > NUL &&  goto show60
ver | find "6.2" > NUL &&  goto show61
ver | find "6.3" > NUL &&  goto show61
ver | find "6.4" > NUL &&  goto show61
ver | find "10.0" > NUL &&  goto show61


:show60
(echo select disk {$1}&echo create partition primary&echo assign letter {$d})|diskpart
format {$d}:/fs:ntfs /q /y

:show61
(echo select disk {$1}&echo online disk&echo attributes disk clear readonly&echo create partition primary&echo assign letter {$d})|diskpart
format {$d}:/fs:ntfs /q /y