Would like a script or code that will run an application after a user logs into terminal server and logoff of terminal server when the user closes the application.
I know I can run the application from the “start the following program on connection” option on the terminal server client. But I want the user to automatically log out of terminal server when the app is closed.