~dp0:切换到当前目录下 echo 'deviceCp start' :: 影藏黑窗口开始 @echo off if "%1"=="h" goto begin start mshta vbscript:createobject("wscript.shell").run("""%~nx0"" h",0)(window.close)&&exit :begin :: 影藏黑窗口结束 cd /d %~dp0/bin java -jar %~dp0/service\deviceCap.jar