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?