I very much doubt that you will be able to prevent the process being closed by the Task Manager. If you need it to be open throughout the duration of the session I would reccomend that you consider implementing it as a service instead.