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 Application Server
  • AVEVA Application Server Tech Notes

TN Appsvr999 How to start and close a program from an application server script

Last updated: March 7th, 2025

Description

  • Author: Michael Viteri
  • Published: March 7th, 2025

Details:

Description

How to start and close a program from an Application Server script

  • Author: Mike Viteri
  • Published: 6/8/2017
  • Applies to: Application Server

Details

There might be a situation where you want Application Server to execute a program for you. If you don't close each program every time Application server opens a program,multiple instances of the program will show in your task manager. This situation can affect computer performance.(Notepad in this example)

Below is an example of script that will launch the program you want to run(Notepad). It waits 5 seconds while the program executes and then close the program. This makes sure multiple instances of the program will not build up in task manager.

Note:Since Wonderware is calling the program it will not show on the Windows desktop only in Taskmanager.

Here is the example of the code:

dim myprocess as System.Diagnostics.Process;
myprocess = System.Diagnostics.Process.Start("notepad");
System.Threading.Thread.Sleep(5000);
myprocess.Kill();

 

launch terminate
Give feedback about this article

Recommended articles

How to receive group emails

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