本帖最后由 gudou 于 2017-4-14 15:55 编辑
附提取含%字符路径的方法,可能还不成熟:- for /f "tokens=3" %%a in ('reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v Desktop') do set dirtmp=%%a
- ECHO SET dirtmp=%dirtmp%>"%temp%\cxdir.bat"
- ECHO 桌面“Desktop”注册表中:%dirtmp%
- call "%temp%\cxdir.bat"
- ECHO 桌面“Desktop”实际:%dirtmp%
- PAUSE>NUL
复制代码
|