Link to home
Start Free TrialLog in
Avatar of Richard Korts
Richard KortsFlag for United States of America

asked on

Windows Scripting

Is there a way to write a windows scripting script to detect if a specific application is open & if so to close it?

Can the converse be done, that is, if application is NOT running, start it?

Thanks
Avatar of NVIT
NVIT
Flag of United States of America image

To check for chrome.exe:
tasklist /FI "IMAGENAME eq chrome.exe"

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Steve Knight
Steve Knight
Flag of United Kingdom of Great Britain and Northern Ireland image

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
Avatar of Richard Korts

ASKER

Steve Knight,

Great.

Now, to show you my naivete, do I create a txt file with that sor of commands in it & make it a Windows Scheduled Task run when I want to?

Thanks
SOLUTION
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
Thanks and spilt points fine! I'm out at mo so on mobile if anything extra needed just ask and one of us can clarify.

Steve