Hi, is there a way I can execute some code every single time the application closes. Either if it crashes, is closed manually, the computer restarts, or closed thru task manager or whatever?
Insteaf of making a windows service, I'm thinking of the program running a another small program thats hidden in the background, which checks periodically if the main program is still running, and if not, if it has shut down correctly, if so, the background program will shut down
essentially, you want a small program running in the background that can detect when your application opens and closes, and swap the proxy setup as needed whenever that happens
I'm also gonna suggest that whatever you're doing, there's probably a more effective way to do it, that doesn't involve screwing with network config for the whole machine
anyways, it doesn't really matter, is there some docs on how to make a windows service and run it from c#?, idk how they work, do I have to manually start and stop them or?