在批处理前面加一段代码就行了@echo off if "%1" == "h" goto begin mshta vbscript:createobject("wscript.shell").run("%~nx0 h",0)(window.close)&&exit :begin ::下面是你自己的代码。