Setting cmd.exe /V:ON flag without starting new instance
Asked Answered
F

2

5

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?

Frazzle answered 29/1, 2009 at 19:56 Comment(0)
R
8

Try this:

setlocal enabledelayedexpansion

There's also

setlocal enableextensions

which is the equivalent of cmd /E:ON.

Reference: setlocal /?.

Rafaelarafaelia answered 29/1, 2009 at 20:7 Comment(0)
M
2

Try

setlocal ENABLEDELAYEDEXPANSION
Meridithmeriel answered 29/1, 2009 at 20:8 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.