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?
Click Start, type cmd, and press Enter to open a command prompt window. In the Windows taskbar, right-click the command prompt window icon and select Command Prompt. A second command prompt window is opened.
The switch /k tells Command Prompt to issue the command that follows, and then stay open so that you can view results or type followup commands. You can also use the /c switch instead /k (use only one of the switches) if you want the Command Prompt window to close after issuing the command.
In computing, start is a command of the IBM OS/2, Microsoft Windows and ReactOS command-line interpreter cmd.exe (and some versions of COMMAND.COM) to start programs or batch files or to open files or directories using the default program.
Try this:
setlocal enabledelayedexpansion
There's also
setlocal enableextensions
which is the equivalent of cmd /E:ON
.
Reference: setlocal /?
.
Try
setlocal ENABLEDELAYEDEXPANSION
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With