troubleshooting Question

Need help with VB Script: Trying to see if program is open, if Is - Switch to it. If not, open it

Avatar of Gssc1414
Gssc1414Flag for United States of America asked on
ProgrammingWindows Batch
5 Comments1 Solution535 ViewsLast Modified:
I am trying to create a .vbs script that will do the following:

1. Look to see if a program is running.
1a. If the program is running, bring the program to the front of the screen. Kind of like ALT-TAB ing, but automatically.
1b. If the program is not running, start it.

I can look for and find the running program, and I can also start the program if it's not running. I cannot seem to figure out how to switch to the program if it's already running. I have been searching around, but cannot seem to find a solution - which is why im here...asking the experts.
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 5 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros