Commands to close an application
Solved
Lcf.vs
-
Noxhol -
Noxhol -
Hello everyone...
I am looking for the simplest possible commands to close an application...
In my opinion, it should be in batch or DOS, but I don't know how to go about it... I know the taskkill command in DOS, but what I need is to write it in a file so I can schedule its execution...
Thank you in advance...
Lcf.vs
I am looking for the simplest possible commands to close an application...
In my opinion, it should be in batch or DOS, but I don't know how to go about it... I know the taskkill command in DOS, but what I need is to write it in a file so I can schedule its execution...
Thank you in advance...
Lcf.vs
13 réponses
Hello, everyone... for my brother who wants to automate the process of closing an application, I suggest using BATCH, which is a type of program that contains MS-DOS commands. To create this type of file, simply write your commands in a notepad and save it with a .bat extension instead of .txt.
So to close Firefox, for example, you would write in a notepad:
TASKKILL /f /im firefox.exe
*/f: to force the process to stop :p
*/im: because you point to Firefox with the process image, the process is:
then save the text with the *.bat extension (example: teste.bat if you have extensions displayed :p if not, put the text file on the desktop and execute this command: rename *.txt *.bat)
Once the extension is changed, just double-click it and OP!!! It’s done!!! Firefox will close!!!
And if you want to run it at startup (I guess!!! :p), just copy it to the following directories:
C:\Documents and Settings\All Users\Menu Démarrer\Programmes\Démarrage
C:\Documents and Settings\Administrateur\Menu Démarrer\Programmes\Démarrage
and the action will take place at startup....
If you need help, here's my MSN, I'd be happy to help you (and the others of course!!!) k2m59@hotmail.com
So to close Firefox, for example, you would write in a notepad:
TASKKILL /f /im firefox.exe
*/f: to force the process to stop :p
*/im: because you point to Firefox with the process image, the process is:
then save the text with the *.bat extension (example: teste.bat if you have extensions displayed :p if not, put the text file on the desktop and execute this command: rename *.txt *.bat)
Once the extension is changed, just double-click it and OP!!! It’s done!!! Firefox will close!!!
And if you want to run it at startup (I guess!!! :p), just copy it to the following directories:
C:\Documents and Settings\All Users\Menu Démarrer\Programmes\Démarrage
C:\Documents and Settings\Administrateur\Menu Démarrer\Programmes\Démarrage
and the action will take place at startup....
If you need help, here's my MSN, I'd be happy to help you (and the others of course!!!) k2m59@hotmail.com
The question wasn't "simpler than taskkill" but rather that according to this process, one must be present...
Me, I would like it to be in a file to automate it...
Thank you
Me, I would like it to be in a file to automate it...
Thank you
I am really happy to come across these messages.
Several people (pros) told me it was
impossible… Grrr…
To make things more complicated, is it possible to give
a delay? That is to say, to say "Okay, you can close the software
but in 1 minute 30 seconds."?...
If I get an answer, a big thank you because I’ve searched like
a damned soul…
Warm regards.
Sylvain
Several people (pros) told me it was
impossible… Grrr…
To make things more complicated, is it possible to give
a delay? That is to say, to say "Okay, you can close the software
but in 1 minute 30 seconds."?...
If I get an answer, a big thank you because I’ve searched like
a damned soul…
Warm regards.
Sylvain
Simpler than Taskkill? I don't see it.
taskkill /F /IM notepad.exe, I don't see how to make it easier to terminate Notepad.
I don't quite understand what problem you're trying to solve.
--
“Life is short - You need Python” -- Bruce Eckel, member of the ANSI C++ committee
taskkill /F /IM notepad.exe, I don't see how to make it easier to terminate Notepad.
I don't quite understand what problem you're trying to solve.
--
“Life is short - You need Python” -- Bruce Eckel, member of the ANSI C++ committee
I would like it to be in a file to automate it...
Well... you can put the taskkill command in a batch file, can't you?
--
“Life is short - You need Python” -- Bruce Eckel, member of the ANSI C++ committee
Well... you can put the taskkill command in a batch file, can't you?
--
“Life is short - You need Python” -- Bruce Eckel, member of the ANSI C++ committee
Lol lol thanks Reby, it's often like that, I've been looking for a bat for two days to close all the applications (by creating a keyboard shortcut pointing to the .bat) as long as they are active and hop, just like that, in a simple sentence you solve my problem
thanks
thanks
Ok. I use a small AI software that
sends command lines.
c:/my_pc/My_images/My_daughter.jpg
It works perfectly but I would like it to
stay displayed for a certain time before closing
the application. For example:
taskkill /F /IM notepad.exe blabla but after 1 minute and 30 seconds
(for example or something else)
If you solve this old problem for me, I ..
I don't know what but I would be very happy :0)
Best regards
Sylvain
sends command lines.
c:/my_pc/My_images/My_daughter.jpg
It works perfectly but I would like it to
stay displayed for a certain time before closing
the application. For example:
taskkill /F /IM notepad.exe blabla but after 1 minute and 30 seconds
(for example or something else)
If you solve this old problem for me, I ..
I don't know what but I would be very happy :0)
Best regards
Sylvain
You can use "<b>ping localhost -n</b><i> NUMBEROFSECONDS </i><b>>nul</b>" <br /> <br />example: <br /> <br /><b>@echo off <br /> <br />Title Close Notepad <br /> <br />ping localhost -n 120 >nul <br />taskkill /f /im notepad.exe</b> <br /> <br />When you run this program in 2 minutes (120 seconds), the Notepad program will close.
hello,
is there still anyone around?
for the info Husky_3d
the command is
ping localhost -n 2 [for 2 seconds]
ps: it works with seconds ;)
now it's my turn ;-)
so I'm looking for the command to close an open image
with Windows Photo Viewer
because I've tried everything looking in task manager etc. to know the exact name
for the bat code
taskkill /IM_icijemetkoi_ /F
thank you in advance
is there still anyone around?
for the info Husky_3d
the command is
ping localhost -n 2 [for 2 seconds]
ps: it works with seconds ;)
now it's my turn ;-)
so I'm looking for the command to close an open image
with Windows Photo Viewer
because I've tried everything looking in task manager etc. to know the exact name
for the bat code
taskkill /IM_icijemetkoi_ /F
thank you in advance
You're welcome, sorry for not getting back to you earlier as I've been quite busy lately lol
Keep me updated if you find anything else; otherwise, you'll have to show me your coding because I'm not quite getting it. By the way, it works for me; it closes when I ask it to, my text, so that's good.
I would also have a question for the forum if there are still people around
I would like to know the coding, still in batch, on how to hide media player or another music player
Thanks in advance
jojeka
Keep me updated if you find anything else; otherwise, you'll have to show me your coding because I'm not quite getting it. By the way, it works for me; it closes when I ask it to, my text, so that's good.
I would also have a question for the forum if there are still people around
I would like to know the coding, still in batch, on how to hide media player or another music player
Thanks in advance
jojeka
@echo off
echo.
echo voilà ça va se fermer dans 90 secondes
echo.
echo hi hi tout simplement avec un txt
echo.
echo.
ping localhost -n 90
taskkill /IM notepad.exe /F
echo.
echo.
echo pour refermer ta commande en auto dans 5 secondes
ping localhost -n 5
exit
voilà un code de A à Z et de Z à A accompagné en bonus pour la nouvelle année xD
un texte d'accompagnement
de mon côté
et bien pas trop eu le temps ces jours-ci à me remettre dessus mais merci en tout cas pour vos réponses et ainsi je m'excuse du retard à répondre
je n'ai toujours pas trouvé comment cacher média player ou ( vlc ), en codage si quelqu'un aurait une solution ou un départ serait cool
merci d'avance
I know the post is old, but good solutions don't fade over time.
Command line directly pasted as a new shortcut on the desktop
C:\Windows\System32\taskkill.exe /f /im skype.exe
works very well on Windows 8.1, perfect for completely closing Skype in two clicks :)