Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Run Exit/Quit?

12 Aug 2013   #1
MourningStar

Microsoft Windows 7 Home Premium 64-bit 7601 Multiprocessor Free Service Pack 1
 
 
Run Exit/Quit?

I know that doing a 'run pathname\programxyz.exe' will start a program. I would like to know what the command would be to exit/quit the program. Could it be something as simple as the same 'run' command with a '-quit' switch suffix?

thnx


My System SpecsSystem Spec
.
12 Aug 2013   #2
Dude

Windows 10 Pro X64
 
 

Have a look here

Microsoft Corporation
My System SpecsSystem Spec
12 Aug 2013   #3
MourningStar

Microsoft Windows 7 Home Premium 64-bit 7601 Multiprocessor Free Service Pack 1
 
 

Quote   Quote: Originally Posted by Dude View Post
Quote   Quote: Originally Posted by MourningStar View Post
I know that doing a 'run pathname\programxyz.exe' will start a program. I would like to know what the command would be to exit/quit the program. Could it be something as simple as the same 'run' command with a '-quit' switch suffix?
Have a look here

Microsoft Corporation
whoah, that page was greek to me.

So, given the 'sample' above, would it be :

taskkill pathname\programname.exe

?

edit : no, that didn't work
My System SpecsSystem Spec
.

13 Aug 2013   #4
DavidE

Multi-Boot W7_Pro_x64 W8.1_Pro_x64 W10_Pro_x64
 
 

Hello MourningStar,

I started MS Paint and created a BAT file to kill the task with this command:
taskkill /IM mspaint.exe

The /IM parameter is for specifying the imagename (listed in Task Manager).
My System SpecsSystem Spec
13 Aug 2013   #5
MourningStar

Microsoft Windows 7 Home Premium 64-bit 7601 Multiprocessor Free Service Pack 1
 
 

thnx David - can you help me create that same .bat file so I can test it on my computer? I assume I would then type that file into the 'run' dialogue?
My System SpecsSystem Spec
13 Aug 2013   #6
Kari

Microsoft Community Contributor Award Recipient

 

To add to what David already told you: Taskkill does not "quit" a program per se, it ends a process. To do it, it needs to know either the process ID (PID) or its process image name, quite often but not always the same than the name of the program's exe file.

An example. You have Windows Media Player running and want to stop it using Taskkill command. To do this you must first give the command (Taskkill), then using a so called switch to tell system if you will use the PID or process image name (/PID or /IM), and finally the respective PID or process image name.

You can find both process image name and PID using command prompt with command Taskklist or in Task Manager:
Run Exit/Quit?-2013-08-13_173847.png
Notice that Task Manager does not show PIDs by default. To see the PIDs, use Task Manager's View Menu > Select Colums.

To stop Windows Media Player using Taskkill command and process image name:
taskkill /IM wmplayer.exe

Notice that the path is not required and should not be added, simply just the process name.

To stop Windows Media Player using Taskkill command and process ID:
taskkill /PID 2400
Kari


My System SpecsSystem Spec
13 Aug 2013   #7
MourningStar

Microsoft Windows 7 Home Premium 64-bit 7601 Multiprocessor Free Service Pack 1
 
 

Thank you Kari. I just learned that there also exists a 'kill' command. Is it same?
My System SpecsSystem Spec
13 Aug 2013   #8
Kari

Microsoft Community Contributor Award Recipient

 

Taskkill is everything you need to kill processes using command prompt.

Kill is a far more complicated PowerShell command to call (run) a cmdlet called Stop-Process and as such not recognized by or usable in command prompt. Basically it does nothing more than Taskkill.
My System SpecsSystem Spec
13 Aug 2013   #9
MourningStar

Microsoft Windows 7 Home Premium 64-bit 7601 Multiprocessor Free Service Pack 1
 
 

^
Thnx again Kari - (o.t. just noticed your stats, I've been a serious Nightwish fan since their beginnings.)
My System SpecsSystem Spec
13 Aug 2013   #10
Kari

Microsoft Community Contributor Award Recipient

 

You are welcome. I liked Nightwish when Anette Olzon was still with them but somehow lost interest after she left the band (was kicked out). What an incredible voice she has!
My System SpecsSystem Spec
Reply

 Run Exit/Quit?




Thread Tools Search this Thread
Search this Thread:

Advanced Search




Similar help and support threads
Thread Forum
Accelerator add-ons quit working
This actually happened after the June updates, just didn't take time to post about it. I used to be able to highlight a word & choose either Wikipedia (default) or a dictionary to read the meaning of it but it doesn't work anymore. Those 2 are still listed in my add-ons. How can I find out what...
Browsers & Mail
Autoplay....quit
After installing a new front panel card reader/USB 2.0 and 3.0 and audio panel, I do not get the auto play window pop up asking me what to do. In Autoplay options I have it set thus, and it never shows connected devices.
Hardware & Devices
AVAST quit working
I have had avast free for 10 years. 3 days ago it stopped working. It will not FIX nor will it START back up. I have gone into Windows "services" and tried to manually start it. It says it starts and then stops. Avast no longer appears in the programs list in CONTROL PANEL. It will not...
System Security
Tried to quit BF3 got BSOD. Now consistent.
I was playing BF3 on my dell l501x and decided to take switch servers so I went to quit the game, after clicking quit the whole computer locked up and I received a bsod shortly after. Now everytime I restart I get the 0x7E bsod. I got into safe mode but before it loads completely it gives me...
BSOD Help and Support
IE 8 quit working
I can't get IE 8 to open. I can with the 64bit version, but the 32 bit won't work. My wife's laptop is doing the same thing and she's running XP. Is there a way to re-install IE?
BSOD Help and Support
Bsod when Quit a game.
I get a Bsod 1/3 times when I Quit a game.
BSOD Help and Support


Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 07:32.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App