If you do not want your application to stop when a user logs off, the application cannot be launched in a user session (indeed WinStation ). This means that your application must be running in a different session. Sessions that do not log out are maintenance sessions. Launch the task manager and add a session id column and look through all the processes and you will see what I mean.
Thus, your application should start as or be launched by the service.
Dougn source share