diff --git a/scripts/remove_drive_letter.cmd b/scripts/remove_drive_letter.cmd new file mode 100644 index 0000000..99c82e5 --- /dev/null +++ b/scripts/remove_drive_letter.cmd @@ -0,0 +1,38 @@ +@echo off +set T=c:\TEMP +set DPARTSCRIPT=%T%\diskpart.txt + +rem create temp directory ... +mkdir %T% 1>nul 2>nul + +rem ===== +rem MAIN +rem ===== + +echo Removing Drive Letter ... +echo. + +> %DPARTSCRIPT% ( + @echo.select disk 0 + @echo.select partition 2 + @echo.remove all dismount + @echo.exit + @echo. +) + +diskpart /s %DPARTSCRIPT% +if %ERRORLEVEL% NEQ 0 ( + echo ERROR: while removing the drive letter! + del /F %DPARTSCRIPT% 1>nul 2>nul + exit /b +) +echo Drive letter removed. + +rem cleanup ... +del /F %DPARTSCRIPT% 1>nul 2>nul + +echo. +echo ====== +echo READY. +echo ====== +