- for /f "tokens=3 delims= " %%i in ("reg query HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced /v HideFileExt") do set z=%%i
- echo %z%
- pause
复制代码 运行如下
去掉双引号如下
直接读取文本到是可以。请问第一个for里应该怎么改?
1.txt
HideFileExt REG_DWORD 0x1- for /f "tokens=3 delims= " %%i in (1.txt) do set zhi=%%i
- echo %zhi%
- pause
复制代码
|