MS Remote Desktop and PrintPreview

As I want to pevent users to modify anything on server, I setup an App to start automatically at user Logon and disconnect at App closing. It seems to work as expected. But…When I open a report printpreview and close the App, the connection closes after about 1-2 minutes. If I close the connection manually there is a problem with next connection. It freezes for 1-2 minutes, then closes automatically. Third connection opens corectly.

Any ideas how to solve that problem ?

TIA
Tosho Tonchev

What version of windows?

How are you starting the app at logon?
How are you terminating the session when the app is closed?

I suspect you might be using Terminal Services and the Printer Redirect which can take time as alot of WMF/EMF data can be sent between server and remote terminal, and the printer spooler can take time to reset.

How long have you waited before attempting to reconnect?

Are you reconnecting to an existing but disconnected session or are you connecting to a new session.

TS has been flaky in my experience since I used it on Server 2003.

Have you looked at Kiosk mode as another way to restrict what a User can and cant do?

It is Server 2019 /looks like W10/. Via “Local Group Policy” ==> “Computer Configuration” ==> “Administrative Templates” ==> “Windows Components” ==> “Remote Desktop Services” ==> “Remote Desktop Session Host” ==> “Remote Session Environment” ==> “Start a program on connection” No matter which user logs Session host starts the program and disconnects on exit automatically. No task bar, no start menu - no way to damage something. I can not connect twice from the same device /licenses are per device/

Can you monitor whether this “startup” app is starting a new instance when the report preview is used, or closing perhaps, when the report preview ends?

Everything is Ok. If I open a preview, continue to do other tasks and finally close the app, the connection backgroud black screen /with minimize and close buttons/ remains for 2.5 minutes and then closes. It should close immediately after the app closure as it does without using preview. Some windows processes and services remain in memory and server shut them down after the timeout.

What is the mechanism that closes this other app? (Sorry if I missed this in a previous comment?)

When you connect remotely as User1 you well see desktop for that user- start button, taskbar and shortcuts. Setting the Remote Desktop Session Host to start an App at logon, there is nothing on the screen but your App . Closing your App the Session Host closes itself and disconnects.

1 Like