Some content on this site is available only to logged-in subscribers. Contact Us for information on becoming a subscriber.

InSource.Solutions | InSource Training | InSource Client Portal
InSource Solutions Logo
Log In Sign Up
InSource.Solutions InSource Training InSource Client Portal Log In Sign Up
  • Home
  • AVEVA InTouch
  • AVEVA InTouch Tech Notes

Launch a different WindowViewer application from a running WindowViewer application

Last updated: February 20th, 2025

Description

  • Author: Brian Schneider
  • Published: February 20th, 2025

Details:

Description

Discusses how to add scripting to an application to shutdown a running InTouch WindowViewer application, and launch a different InTouch WindowViewer application.

Pre-Requisites

You must have InTouch already installed, and two applications which you would like to switch between.

Detailed Steps

This solution will involve using batch files to load a new application after WindowViewer has been shut down via a script.

  1. Creating a button in InTouch to start the other application.
    1. Open WindowMaker and create a button on the screen. This button will be used to shutdown WindowViewer and load the alternate application.
    2. Double click on the button to open the animation links.
    3. Select Action Script and configure it as shown:
  2. Create a batch file to launch the alternate application. (There will be one batch file for each alternate application)
    1. The following script will use the Ping function to wait for a few seconds, giving WindowViewer time to shutdown, then will start the specified WindowViewer application.
      1. The following script must be configured. You will need to specify the path to InTouch WindowViewer, the path to the application you want to run, and the amount of time to wait before launching the new application. These will be configured in the “Settings” section.

Copy and paste the following information into a batch file, and save it to C:\LaunchApp2.bat, or use the attached file.

@REM ***** COMMENTS *****
@REM Purpose:
@REM This batch file will wait for a specified amount of time, then launch InTouch WindowViewer,
@REM specifying the particular application which should be run.
@REM
@REM Configuration:
@REM To use this batch file three settings will need to be adjusted in the SETTINGS portion of the file.
@REM 1) InTouchPath (Found below on Line 28)
@REM The path to where InTouch WindowViewer is installed on the computer.
@REM - For 32bit systems the default is "C:\Program Files\Wonderware\InTouch\view.exe"
@REM - For 64bit systems the default is "C:\Program Files(x86)\Wonderware\InTouch\view.exe"
@REM 
@REM 2) ApplicationPath (Found below on Line 29)
@REM The path to the InTouch application you would like to run.
@REM - Example: "C:\MyInTouchApps\App2\"
@REM
@REM 3) WaitTime (Found below on Line 30)
@REM The amount of time in seconds to wait before launching WindowViewer.
@REM - Example: 10 will wait 10 seconds.
@REM
@REM **********************

@ECHO OFF
CLS
setlocal

@REM ****** SCRIPT ******
@REM ** Modify these values for your specific application ***
SET InTouchPath="C:\Program Files\Wonderware\InTouch\view.exe"
SET ApplicationPath="C:\MyInTouchApps\App2\"
SET /a WaitTime=10
@REM **********************


@REM ****** SCRIPT ******
@REM ** DO NOT MODIFY ***

ECHO WindowViewer will be restarted in %WaitTime% seconds.
ECHO.

SET /a LoopCount=0

:LOOP
IF %LoopCount% == %WaitTime% GOTO STARTINTOUCH
PING 1.1.1.1 -n 1 -w 1000 1> nul 2>&1
<nul (set/p z=".")
SET /a LoopCount=%LoopCount%+1
GOTO LOOP

:STARTINTOUCH
ECHO.
ECHO.
ECHO.
ECHO Launching WindowViewer
%InTouchPath% %ApplicationPath%

@REM **********************

open new alternate launch
Give feedback about this article

Recommended articles

TN - 1240 Creating a Watchlist Using an Import File

Read More
Support Icon

CONTACT SUPPORT

How to reach us

10800 Midlothian Turnpike Tpke, Suite 209, Richmond, VA 23235

1.877.INSOURCE

Technical Support - 1.888.691.3858

Contact Us

  • InSource Solutions
  • InSource Training
  • InSource Client Portal
  • Log In
InSource Solutions Logo

© 2025 InSource Solutions. All Rights Reserved.

Knowledge Base Software powered by Helpjuice

Expand