回复 q9339
cd /d "%desktop%"
Batcher 发表于 2023-7-25 14:21 
@echo off
:: 获取当前用户Desktop路径
::REG_SZ
set desk_rq=REG QUERY "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v "Desktop"
for /F "tokens=3,*" %d in ('%desk_rq%') do set desk_path=%d %e
echo desk_path=%desk_path%
::REG_EXPAND_SZ
set desk_rq_ex=REG QUERY "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "Desktop"
for /F "tokens=3,*" %d in ('%desk_rq_ex%') do set desk_path_ex=%d %e
echo desk_path_ex=%desk_path_ex%
cd /d %desk_path_ex%
提示系统找不到路径。。。 这个是 参数错了吗 ? |