jungleNZ Posted April 19, 2020 Share Posted April 19, 2020 Hi, I am trying to learn from all the scripts available and online so I can implement scripts to mods in my configs. I have looked at python and batch commands. Currently working on Assetto Config. I have a mod called sTracker that I get to install ok. I then have a start sTracker (from the more button), command runs, service starts. If I run it on another gameserver it start another service. My issue is when I go to stop tracker on one server (taskkill /IM stracker.exe /F) it kills both or all stracker named services. I have looked online to try and differentiate but no luck. Is anyone able to guide my into either batch file way or python way to resolve. Appreciated jungle (James) GNZ Link to comment Share on other sites More sharing options...
Aeioyoo Posted April 19, 2020 Share Posted April 19, 2020 Kill by PID instead? You'll need to take note of the PID when the service is launched too, maybe via a variable. Link to comment Share on other sites More sharing options...
jungleNZ Posted April 19, 2020 Author Share Posted April 19, 2020 2 hours ago, Aeioyoo said: Kill by PID instead? You'll need to take note of the PID when the service is launched too, maybe via a variable. thanks, have explored that method no avial. For some strange reason when i run bat file or exe it creates 2 named.exe's in processes. Link to comment Share on other sites More sharing options...
Disasta Posted April 24, 2020 Share Posted April 24, 2020 I normally have a script on mod install that renames the exe, eg. REN %ThisService_RootDirectory%Mod.exe Mod%ThisService_ServiceId%.exe Then you can just use taskkill /IM mod%ThisService_ServiceID%.exe /F As each services mod exe now has a unique name Link to comment Share on other sites More sharing options...
jungleNZ Posted April 24, 2020 Author Share Posted April 24, 2020 (edited) 16 minutes ago, Disasta said: I normally have a script on mod install that renames the exe, eg. REN %ThisService_RootDirectory%Mod.exe Mod%ThisService_ServiceId%.exe Then you can just use taskkill /IM mod%ThisService_ServiceID%.exe /F As each services mod exe now has a unique name Thanks, will look into this. WORKS LIKE A CHARM - THANK YOU VERY MUCH FOR INPUT. Edited April 24, 2020 by jungleNZ Link to comment Share on other sites More sharing options...
dark Posted June 20, 2020 Share Posted June 20, 2020 how do i run exe after mod install along with game server? Link to comment Share on other sites More sharing options...
dark Posted June 20, 2020 Share Posted June 20, 2020 never mind, worked it out Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now