Skip to content

Instantly share code, notes, and snippets.

@ialex32x
Created May 13, 2019 09:01
Show Gist options
  • Save ialex32x/a25dbf7fda892f93748aa977f251cd73 to your computer and use it in GitHub Desktop.
Save ialex32x/a25dbf7fda892f93748aa977f251cd73 to your computer and use it in GitHub Desktop.
在 bat 批处理中杀死和启动进程
SET EXE=.\bin\sgless
REM 杀掉所有指定进程名的进程
taskkill /f /im %EXE%
REM 杀掉所有指定窗口名字和进程名的进程
taskkill /f /im %EXE% /fi "WINDOWTITLE eq NT_CENTER"
REM 以指定窗口名启动指定进程
START "NT_CENTER" %EXE% --type=NT_CENTER --launch=res/core/centersrv.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment