首先是在所有命令的最前面添加(参考)
if "%1" == "h" goto begin
mshta vbscript:createobject("wscript.shell").run("""%~nx0"" h",0)(window.close)&&exit
:begin
保证该控制台隐藏运行(mai2_startup),然后借助nircmd来隐藏后面启动的控制台程序
在inject前添加nircmd exec hide
命令使amdaemon.exe隐藏运行
- 成品start.bat
if "%1" == "h" goto begin
mshta vbscript:createobject("wscript.shell").run("""%~nx0"" h",0)(window.close)&&exit
:begin
@echo off
pushd %~dp0
nircmd exec hide inject -d -k mai2hook.dll amdaemon.exe -f -c config_common.json config_server.json config_client.json
inject -d -k mai2hook.dll Sinmai (Patch and Run) -screen-fullscreen 1 -popupwindow -screen-width 2160 -screen-height 3840silent-crashes -monitor 2
taskkill /f /im amdaemon.exe > nul 2>&1
echo.
echo Game processes have terminate