Avatar of Tristan George
Tristan George
 asked on

Windows 10: VBS to start a EXE. Then stop a service. Once closed start service back up and exit script.

Need a script that will:

1. start a program in:  D:\Program Files (x86)\Steam\steamapps\common\DARK SOULS III\Game\DarkSoulsIII.exe
2. wait 5 Seconds, then STOP the Service: "windows management instrumentation"
3. Every 60 seconds check if DarkSoulsIII.exe is running. If it is do NOTHING, but loop back to the 60 second check.
4. If it is NOT, then START the service "windows management instrumentation"
5. Kill script. Done.

Thanks for everyones help. I am thinking this is pretty simple, but examples I find similar are for more complex scripts which is actually making doing the above hard to know how.

Thanks again.
Microsoft DOSWindows BatchComputer GamesVB Script

Avatar of undefined
Last Comment
Bill Prew

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Bill Prew

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Your help has saved me hundreds of hours of internet surfing.
fblack61