Skip to main content
InSource Solutions

TN IT116 InTouch WindowViewer Locks up in a Terminal Session

insource_logo_large.jpg problem-solving.jpg




The following solution is intended to provide a workaround for WindowViewer freezing up while running in a terminal server session.  A reboot of the session is required to restart the WindowViewer when locked up.  This solution provides an automated method to reboot the session when the problem occurs. 



Rich Brooks

Publish Date 9/10/2014

Applies to Software

InTouch TSE and ThinManager

Applies to Version


Applies to System/Module

Terminal Services

Article Version





Edit section

ThinManager has a TermMon ActiveX Control that may be used to remedy InTouch WindowViewer lockups in a terminal session.  Freezing applications of this sort require a reboot of the session.  The TermMon  control provides a watchdog timer that counts down and then restarts the session if necessary. 

Detailed Steps 

Edit section

The TermMon ActiveX must be registered on the development and runtime machines.  This is done by copying the TermMon.ocx file from the ThinManager installation disk.  The control is registered using the command line as show below.  Register the OCX by executing:  Regsvr32 path\TermMon.ocx.



It is necessary to install the TermMon Control from the InTouch Wizard/ActiveX Installation dialog found in the WondowMaker from the menu Special – Configure.  Highlight TermMon Control from the Available ActiveX controls list and press Install to move it to the Installed ActiveX Controls list.



The TermMonCtrl is then available from the toolbar Wizard Selection tool.  Select and place the control on a window that will be open all the time.  A header or footer window that does not close will work.  Another option is to place it on its own window located off the screen.  Configure this window as an overlay that opens on WindowViewer startup.



The TermMon control has its own set of properties, methods, and events.  The watchdog timer is enabled by setting the RunInSession property to true as well as setting the WatchdogTime property to the number of seconds.  Setting the WatchdogTime property to zero turns it off.  The following is an example On Show script to initialize the properties.  A memory integer tag named WatchdogTimer is used to display the timer from the InTouch window.  This is optional.



It is necessary to reset the WatchdogTime property before it reaches zero.  The watchdog function will count down the seconds when enabled.  Below is an example script to monitor the timer every second.  The WatchdogTime value is reset to 10 when it reaches a value less than or equal to five.



The control will keep resetting the watchdog as long as the application is functioning properly.  A lockup will prevent it from updating the watchdog.  The session will be killed when the time reaches zero.  This will shutdown the WindowViewer with the popup show below.  The thin client will automatically reconnect and start a new session with the application running.