call :IsAdmin :: 输出到日志 > bakup_%date:~0,4%%date:~5,2%%date:~8,2%.log mvn clean package -Dmaven.test.skip=true & cd target & copy /Y "hy-tool-0.0.1-SNAPSHOT.jar" "../hy-tool-0.0.1-SNAPSHOT.jar" & cd ../ & java -jar hy-tool-0.0.1-SNAPSHOT.jar :IsAdmin Reg.exe query "HKU\S-1-5-19\Environment" If Not %ERRORLEVEL% EQU 0 ( Cls & Echo You must have administrator rights to continue ... Pause & Exit ) Cls