Install cmd.exe / V: ON flag without starting a new instance

Is there a way to enable the execution variable extension for cmd.exe (usually done by typing cmd /V:ON) without starting a new instance of cmd.exe?

Similarly, can other parameters / flags be changed on the fly?

+5
source share
2 answers

Try the following:

setlocal enabledelayedexpansion

There also

setlocal enableextensions

which is equivalent cmd /E:ON.

Link: setlocal /?.

+8
source

Try

setlocal ENABLEDELAYEDEXPANSION
+2
source

All Articles