Computing.Net > Forums > Disk Operating System > Close Win Program with a Batch File

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Close Win Program with a Batch File

Reply to Message Icon

Name: JohnTooth
Date: September 22, 2003 at 10:21:52 Pacific
OS: Windows XP
CPU/Ram: pentium/128
Comment:

Is there any way to close a windows program with a batch file?



Sponsored Link
Ads by Google

Response Number 1
Name: SkipCox
Date: September 22, 2003 at 12:44:03 Pacific
Reply:

Try sticking exit on the end of the file as in:

@echo off
control.exe sysdm.cpl, system,1
exit


0

Response Number 2
Name: dualpurpose
Date: October 6, 2003 at 17:31:26 Pacific
Reply:

Hello John

XP has a command TASKKILL...which kills a running process

eg at the prompt type :

TASKKILL /F /IM Notepad.exe /T

/F will force it to close
/IM is the Image Name (Notepad.exe)
/T kills any child process generated by the parent

type TASKKILL /? at the CMD prompt for more options


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Disk Operating System Forum Home


Sponsored links

Ads by Google


Results for: Close Win Program with a Batch File

set dir size with a batch file? www.computing.net/answers/dos/set-dir-size-with-a-batch-file/12277.html

Help with a batch file www.computing.net/answers/dos/help-with-a-batch-file/4632.html

email with a batch file using blat www.computing.net/answers/dos/email-with-a-batch-file-using-blat/14340.html