How to close a program thro Command prompt?

I use a telnet script that reboots my router.
after rebooting, the program dialog box remains open.
- -
i would like to know some way so that i can automatically close the dialog box 5 min after it has rebooted my router..
 
^ batch scripts are so old school.

I would recommend autohotkey or autoit if you want greater control with automation. You can practically control anything within windows using them, and you don't even need programming skills. It has a learning curve though, but you'll be fine with the excellent help file of the above programs.

btw, instead of saving your script as a batch file, you can save it as command file (.CMD) and you'll have long file name support and lesser path errors.
 
maybe i should have explained myself better; instead of writing a cryptic sentence..

I am not a geek so plz cut me some slack.. :(

I am on MTNL triband & hav to reboot the router at 12:05AM in night & at 7:50AM in the mrng.

I use Windows task scheduler to launch a Telnet program at 12:05AM that runs a script that reboots my router .

This however leaves the "black dos window" open after the reboot.

I have also scheduled Task scheduler to launch this Telnet program at 7:50AM in mrng.

Thats where the problem is.

Since the Telnet program's DOS window is already open (since the night) ; Task scheduler cannot launch the already running program.

Consequently, the Telnet program doesnt reboot my router at 7:50 am.

Result of above: i get screwed.

So basically wat i need is to somehow close the Telnet program so that Task scheduler is able to launch it again in the mrng.
 
im a n00b as well...but a lil bit i can help....
the script file is a .bat file ?

oh just thought of this......

In task scheduler schedule another task say - 10-15 mins after the earlier script runs :)
and use :

taskkill /im <program_name>.exe
exit
 
Back
Top