(Windows7, Windows XP測試通過)
@echo off ::呼叫GetDesktop call :GetDesktop ::輸出 echo Desktop @ %desktop% ::跳到檔尾(離開Batch) goto :EOF :GetDesktop reg query "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v Desktop | find "Desktop" > o.txt for /F "tokens=2 delims=\" %%a in (o.txt) do set "desktop=%userprofile%\%%a" del o.txt goto :EOF
沒有留言:
張貼留言