Difference between revisions of "Kill all processes running from the game server's root folder"
(Created page with "This Windows batch script kills all running processes located in the game server's root directory. set exelocation=%ThisService_RootDirectory% wmic path win32_process where...") |
|||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | This Windows batch script kills all running processes located in the game server's root directory. | + | This Windows batch script kills all running processes located in the game server's root directory and sub directories. |
− | set exelocation=%ThisService_RootDirectory% | + | set exelocation=%ThisService_RootDirectory:\=\\% |
− | wmic path win32_process where "ExecutablePath like '%exelocation | + | wmic path win32_process where "ExecutablePath like '%%%exelocation%%%'" call terminate |
Latest revision as of 12:39, 23 December 2022
This Windows batch script kills all running processes located in the game server's root directory and sub directories.
set exelocation=%ThisService_RootDirectory:\=\\% wmic path win32_process where "ExecutablePath like '%%%exelocation%%%'" call terminate
This Windows batch script kills a specific process located in the game server's root directory.
set executable=%ThisService_RootDirectory%CustomExe.exe wmic path win32_process where "ExecutablePath like '%executable:\=\\%'" call terminate