You can refer to the following command: @echo off if "%1" == "h" goto begin mshta vbscript:createobject("wscript.shell").run("%~nx0 h",0)(window.close)&&exit :begin c:/frp/frpc.exe -c c:/frp/frpc.ini