Question Locked

Automatically close running application

0 helpful
6 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
Is there a way to close a running application in Windows with a batch file? The catch is in order to close the application you need a password. So, I would like to automatically close this application (java app), enter password to close, then restart app all with a batch file. If this can't be done with a batch file is there any other type of script I can use to accomplish this?

6 replies

by fred123456

TSKILL, its built in to windows, just type "tskill /?" at a command prompt to see variables.

by Member 25348569

If you use vbscript, you can send the password using the Shell method SendKeys after setting the focus to the correct window with the Shell method AppActivate,

by cwill

A big thanks to everyone who replied. This needs to run on a few Win2000 machines so that excludes using TSKILL and PSKILL didn't seem to do the trick. I followed Neil's advice and was able to create a vbscript file easy enough to accomplish all of this. I don't even know vbscript so I surprised myself when it worked!

Thanks again everyone!

by Member 25348569

To be honest, I was expecting a couple more questions so I'm impressed that you got it from here! You've started so you can do damn nigh anything, now.

Until, of course, Longhorn comes in and you have to use Powershell!

:D

This discussion is closed to new replies.