как минимум нужно закавычить все %Label%
Код:
![Выделить весь код](images/misc/selectcode.png)
@echo off
>nul chcp 1251
set "Label=WINDOWS VISTA (игровая)"
for %%a in (Z: Y: X: W: V: U: T: S: R: Q: P: O: N: M: L: K: J: I: H: G: F: E: D: C:) do if exist %%a\. for /f "tokens=6,*" %%b in ('vol %%a') do if /i "%%c" == "%Label%" set "Drive=%%a"
if not "%Drive%" == "" (echo Label: "%Label%" && echo Letter: %Drive%) else (echo Label "%Label%" is missing)
if not "%Drive%" == "" if exist "ReMount.exe" (
cmd.exe /C "ReMount.exe" -ReMount %Drive% R: -f
) ELSE (
echo File ReMount.exe is not exist.
)
echo.
pause > nul