Rislem Posted February 12, 2017 Share Posted February 12, 2017 Hi Everyone I currently trying to make setup files for a game (Conan) but it needs you to press CTRL+C on the console it opens to close the game successfully. Does anyone know how I can setup my template so it does that instead of ending the process? Ending the process isnt so good for the current state of the game. Link to comment Share on other sites More sharing options...
wirs Posted February 12, 2017 Share Posted February 12, 2017 Create a costum script Event: Before stopped Script.WriteToConsole("^C"); Should work fine Link to comment Share on other sites More sharing options...
Rislem Posted February 12, 2017 Author Share Posted February 12, 2017 Thanks very much, any chance I can then ask it to wait 20 sec or something? Cause sometimes it takes a while to shutdown. Link to comment Share on other sites More sharing options...
Rislem Posted February 12, 2017 Author Share Posted February 12, 2017 Create a costum script Event: Before stopped Script.WriteToConsole("^C"); Should work fine Thanks very much, but it seems to still just kill the process, I checked the logs and it doesnt seem to do anything Link to comment Share on other sites More sharing options...
wirs Posted February 13, 2017 Share Posted February 13, 2017 What os are you using? ^C means ctrl+c on linux which shuts down servers gracefully Link to comment Share on other sites More sharing options...
ECF Posted February 13, 2017 Share Posted February 13, 2017 (edited) With Windows you can check the "Interact with Desktop" option in service settings. This will allow the CTRL+C to be sent to the console. This method does not work on Linux. However, please see the following link for pause, wait and sleep commands. This may be needed so the server can shutdown properly. I have NOT tried this method. http://www.wikihow.com/Delay-a-Batch-File Edited February 13, 2017 by ECF Link to comment Share on other sites More sharing options...
Rislem Posted February 14, 2017 Author Share Posted February 14, 2017 (edited) With Windows you can check the "Interact with Desktop" option in service settings. This will allow the CTRL+C to be sent to the console. This method does not work on Linux. However, please see the following link for pause, wait and sleep commands. This may be needed so the server can shutdown properly. I have NOT tried this method. http://www.wikihow.com/Delay-a-Batch-File I really appreciate your help, just a quick question I have done and ticked that option, I generally have it on, but now where do I go and tell it to send a ctrl+c command? Do I write a custom script, problem with custom script is it will attempt to type in the console box which you cant unless I am wrong. There is a tab for console text do I just type in CTRL+C in that box ? PS running windows Edited February 14, 2017 by Rislem Link to comment Share on other sites More sharing options...
ECF Posted February 14, 2017 Share Posted February 14, 2017 Running as Interact with Desktop, TCAdmin automatically sends the CTRL+C command before shutting down the process. However... judging by the tickets we have received that is not working for this particular game. Link to comment Share on other sites More sharing options...
Rislem Posted February 15, 2017 Author Share Posted February 15, 2017 Hi ECF thank you very much again for your effort, I am also speaking to Luis about this I am hoping we can find a alternative, its not a train smash if it kills the process but the shutdown procedures removes all un wanted items and stuff so its best if we can find a alternative solution Link to comment Share on other sites More sharing options...
Dennis Posted February 15, 2017 Share Posted February 15, 2017 However... judging by the tickets we have received that is not working for this particular game. I think you might be correct on this one ;-) Link to comment Share on other sites More sharing options...
ECF Posted February 15, 2017 Share Posted February 15, 2017 Luis is currently testing on a client's server. Hopefully he can find a way to send the command. Link to comment Share on other sites More sharing options...
Stark Posted February 16, 2017 Share Posted February 16, 2017 Hello! After a lot of testing (and I mean *a lot*), I can confirm that the Script.WriteToConsole("^C") does not work on Windows and Conan Exiles. From the Steam community, I see many server "managers" use AutoHotKey to find a named process and use AHK to send CTRL-C to the server window. I, personally, don't see this as a very viable method when you're hosting multiple servers on the same box. I've also looked at Python's documentation, and in 2.7 there's something called os.kill() which is supported on Windows, where it uses the application PID and a signal called "signal.CTRL_C_EVENT". But I haven't gotten this to quite work either -- I'm only being tossed errors back, but I do believe I'm on the right track to get something to work here. Anyone else looked at this? Link to comment Share on other sites More sharing options...
Magesw Posted February 19, 2017 Share Posted February 19, 2017 Hello! After a lot of testing (and I mean *a lot*), I can confirm that the Script.WriteToConsole("^C") does not work on Windows and Conan Exiles. From the Steam community, I see many server "managers" use AutoHotKey to find a named process and use AHK to send CTRL-C to the server window. I, personally, don't see this as a very viable method when you're hosting multiple servers on the same box. I've also looked at Python's documentation, and in 2.7 there's something called os.kill() which is supported on Windows, where it uses the application PID and a signal called "signal.CTRL_C_EVENT". But I haven't gotten this to quite work either -- I'm only being tossed errors back, but I do believe I'm on the right track to get something to work here. Anyone else looked at this? Let me know how that works out, right now I am working on using a batch file to try and get it shutdown safely. 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