1

I need a batch program .bat to pass prompted password to manage-bde -unlock -pw.

Tried this unlock.bat with password devel!

@ECHO OFF
:GetID
set "id="
set /P id=Enter id:
cmd /k manage-bde -unlock  K: -pw %id%
ERROR: Invalid Syntax.
"devel!" was not understood.
Type "manage-bde -?" for usage.
phuclv
  • 30,396
  • 15
  • 136
  • 260
corsair
  • 11

1 Answers1

0

ERROR: Invalid Syntax.

You need quotes around the command:

cmd /k "manage-bde -unlock  K: -pw %id%"

Syntax

CMD [charset] [options] [/K Command]

Command : The command, program or batch script to be run. This can even be several commands separated with '&' (the whole should also be surrounded by "quotes")

Source: CMD.exe (Command Shell) - Windows CMD - SS64.com


Further Reading

DavidPostill
  • 162,382