I'm making a console app in c# for monitoring use in company pcs, the app works great, but my problem is that I want to make that if worker close it, i want to either disallow to close it (although i've read that it's not possible to avoid that he closes it from task monitor) or restart it again.
My approach was to write a windows service that checks if app is running, but when started from service, app doesnt record users activity correctly (even allowing service to interact with desktop, by checking it on service control tab).
I've think also in making a scheduled task, that monitor if app is running and restarts it if needed.
My question is, what is the best approach to make that an app keeps going on while user (regular user, not admin rights) is logged in and can not be closed by him?
PD: If he closes the app, he could be not working and it will be no constance of it ;)