Is there any way to enable execution-time variable expansion for cmd.exe (normally done by typing cmd /V:ON
) without starting a new instance of cmd.exe?
Similarly, can other settings/flags be changed on the fly?
Is there any way to enable execution-time variable expansion for cmd.exe (normally done by typing cmd /V:ON
) without starting a new instance of cmd.exe?
Similarly, can other settings/flags be changed on the fly?
Try this:
setlocal enabledelayedexpansion
There's also
setlocal enableextensions
which is the equivalent of cmd /E:ON
.
Reference: setlocal /?
.
© 2022 - 2024 — McMap. All rights reserved.