- rem 桌面变量
- for /f "tokens=2,*" %%i in ('reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v "Desktop"') do set "desktop=%%j"
-
- rem 搜索到如果有这个文件并把路径变量为GxPath 如果没有让他执行bb 这里该怎么写
- set GxPath=
- for /f "delims=" %%a in ('dir /a-d-h/b/s "\\192.168.101.240\共享\setting.rar" ') do set "GxPath=%%~dpa"
-
- if not defined GxPath goto bb
-
- :aa
- cd %desktop%\配置
- start winrar x %GxPath%\setting.rar -y
- exit
-
-
- :bb
- exit
复制代码
|