Link to home
Start Free TrialLog in
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.
ASKER CERTIFIED SOLUTION
Avatar of Bill Prew
Bill Prew

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial