Prevent Multiple Application Instance Launching

Run this script to prevent users from running multiple instances of applications and degrading system performance.

Readers

February 10, 2003

1 Min Read
ITPro Today logo in a gray background | ITPro Today


Users sometimes become impatient when they're trying to launch an application. While the application is loading, a user might double-click the icon again and launch a second instance of the application. When you're running Windows 2000 Server Terminal Services—as in my organization—launching multiple instances of applications negatively affects performance.

To prevent users from launching a second instance of an application, I wrote the script that Listing 4 shows. ChkProcess.vbs checks to determine whether a user is already running an application. If so, the script generates a message box that tells the user he or she can run only one instance of the application at a time. The script uses the command-line arguments Program and Target. The script's syntax is wscript chkprocess.vbs app.exe c:appfolderapp.exe.

—David Ferentheil
[email protected]

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like