Recibir mensaje de error: el parámetro es incorrecto

Recibir mensaje de error: el parámetro es incorrecto

Recibo este mensaje de error cuando uso este archivo por lotes para montar y desmontar una unidad en Windows 10.

montaje:

@echo off

REM Be sure to change this to the drive letter you want to mount the drive to!
set drive=E

REM Be sure to change this to the Volume Name of the drive you want to mount!
set volume=\\?\Volume{52ade1a4-0fd4-44cd-aa69-bfda739bb9e6}\
set volume=\\?\Volume{4d654d26-f65d-4c67-b83c-876de0d6820b}\
set volume=\\?\Volume{59cc5e85-9403-425f-bd28-c22ed4e8ab8d}\
set volume=\\?\Volume{52fdf924-f0fb-4ba7-99e0-096a9c9d124a}\

:start
echo Mounting Drive...
mountvol %drive%: %volume%
echo Drive Mounted!

pause
exit

desmontar:

@echo off

REM Be sure to change this to the drive you want to unmount! 
set drive=E:

echo Unmounting Drive...
mountvol %drive% /p
echo Drive Unmounted!

pause
exit

Cualquier ayuda será muy apreciada.

Respuesta1

El montevol la sintaxis es:

mountvol [drive:]path VolumeName

El comando debería verse así:

mountvol %drive%:\myfolder %volume%

Puede intentar lo siguiente, pero corre el riesgo de fallar porque a Windows no le gustan los archivos en la raíz del disco:

mountvol %drive%:\ %volume%

Verifique también eso %drive%y %volume%tenga los valores correctos al ejecutar.

información relacionada