@echo off %1 %2 ver|find "5.">nul&&goto :Admin mshta vbscript:createobject("shell.application").shellexecute("%~s0","goto :Admin","","runas",1)(window.close)&goto :eof :Admin setlocal EnableDelayedExpansion SET basepath=%~dp0 :: 设置源目录和目标目录 set "sourceDir=%basepath%\copy2c" set "destinationDir=C:\" xcopy %sourceDir% %destinationDir%\ /q /e /r /S /Y cd /d C:\ call c:\setPath.bat endlocal