Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
cmd /V:ON有没有办法在不启动 cmd.exe 的新实例的情况下为 cmd.exe 启用执行时变量扩展(通常通过键入来完成)?
cmd /V:ON
同样,是否可以即时更改其他设置/标志?
试试这个:
setlocal enabledelayedexpansion
还有
setlocal enableextensions
这相当于cmd /E:ON。
cmd /E:ON
参考资料:setlocal /?。
setlocal /?
尝试
setlocal ENABLEDELAYEDEXPANSION