How to close running program?

Is there a way to close a program in Windows if I know the loaded exe name? How is this done?
There is a program called kill.exe from the NT resource kit. It's used as "kill.exe processname". I'd like to use something similar but through a Java object.
Thanks,
Brett

You can close only those programs which you run through your java program. e.g. you can run a batch file through your java program as follows:
Runtime runtime = Runtime.getRuntime();
Process process = runtime.exec("c:\\my.bat");
Now you have a reference of your created program. At any time you can close it as follows:
process.destroy();

Similar Messages

  • How to close external programs?

    Hi there,
    in vbs is a command "ExtProgram(ExtProgramName, ExtProgramArg)" to
    start external programs. But how to  close external programs when
    they finished its work? Is there a vbs-command for it? Is there a way
    when calling "cmd.exe" with a proper parameter?
    Martin Bohm

    Hello Martin!
    Yes, with the tool 'tasklist' in the same directory.
    The problem is that it is not easy to query from script. I tried it in the following script. Perhaps not perfect espacially because a command interpreter pop up every time you call the function.Option Explicit
    If IsDIAdemRunning() Then
    Call MsgBox( "At least one DIAdem is running!" )
    Else
    Call MsgBox( "No DIAdem at all!" )
    End If
    Function IsDIAdemRunning()
    Dim oWshShell
    Dim oExec
    ' Execute via Shell Object
    Set oWshShell = CreateObject("WScript.Shell")
    Set oExec = oWshShell.Exec( "C:\windows\system32\tasklist.exe /FI ""IMAGENAME eq DIAdem.exe""")
    ' wait until tasklist is finished
    Do While oExec.Status = 0
    Pause(1)
    Loop
    ' no Standard Output -> no DIAdem running
    IsDIAdemRunning = Len(oExec.StdOut.ReadAll) <> 0
    End Function
    A better solution might be possible via WMI.
    Matthias
    Matthias Alleweldt
    Project Engineer / Projektingenieur
    Twigeater?  

  • After the update I don't know how to close running apps? I recall double clicking the main button then hold one app until they begin a jiggling motion. But that no longer works.

    How do close running apps?

    You still double tap the home button and the apps are lined up across the screen. Swipe up on the app preview thumbnail - drag it up off of the screen - and that will close the app.

  • Ios 7.0.2 issue: how to stop running programs

    I am a new iPhone5 user and just installed ios 7.0.2 (maybe I should not have but I did). Now I don't know how to stop running programs. Previously
    I double-clicked the Home button, then saw the icons that represented running programs, then could lightly touch one of them which led to all of them
    showing a X for a potential delete. That does not work now so how do I do it?

    Double click the home button and then swipe up on the app screenshots.

  • PE 12 won't install on my Mac. Message says close running programs but none are running

    Why won't Photoshop 12 for mac install? I get a message to close running programs but none listed and none are running. Tried several times including restarting computer

    Tried that but nothing other than the Finder was open in activity monitor. However stumbled on the fact that Sugarsync was running although it did not show up anywhere. Closed it and installation worked!
    Sent from my iPad

  • How to clear running programs

    How do I clear the running programs on my iPad 2?   I fingured out how to bring them up - pushing the button 2x.  I figured out how to check them - hold button down.  but How do I clear them?

    Shut down an app...
    - From any Home Screen, double tap the home button to bring up the Recents List
    - Tap and hold any icon until they wiggle
    - Press the red to delete the offending app from this list.
    - Press the home button twice when done.
    - Restart the app
    Note that the vast majority of apps cannot and do not run in the background.  For more info on Multitasking...
    http://support.apple.com/kb/ht4211
    http://whenwillapple.com/blog/2010/04/19/iphone-os-4-multitasking-explained-agai n/
    http://www.macworld.com/article/1164616/how_ios_multitasking_really_works.html
    http://speirs.org/blog/2012/1/2/misconceptions-about-ios-multitasking.html

  • How to close open programs

    When you double click the home button, how do close the open application?

    Double tap the Home button, then swipe upwards on the App Preview (not the App Icon)

  • How to close a program that is not visible

    I have downloaded an app/program that I cannot delete as it keeps telling me the program is still open, but I am unable to open it and find it. The program is Tone Sync Zedge. Any help is greatly appreciated.

    Hello Niel
    Thanks for your advice. I tried both ways you suggested and neither worked. It keeps telling me the program is open and when I click on the program to "open" it., nothing happens. I really appreciate your advise as MAC is new to me and I know know how to delete a program that is normal, just nto working with the unfortunate download I put onto the computer. Any advise is greatly appreciated!

  • How to close running apps on iPod touch with new update

    I can't figure out how to close apps to save battery life since this update. Any resources on how to operate the iPod touch with the new update would be appreciated.

    Double click the Home button and swipe the thumbnail of the app (not the app icon) upwards to delete/close the app.
    That is included in the manual
    ios 7.0 ipod touch Manual

  • How to close running applications listed in Application tab of Windows Task Manager

    Hii,
    I am using Labview7.0. I want to close all running applications except my labview based exe in Applications tab of Windows Task Manager. So pl help me how can I do it through labview7.0 Programmatically.
    Vijtin....

    You can use the utilities attached, when you unzip it you can open the lvwutil32 folder and then you will find Winevent.llb inside it is the Quit Application.vi  is very easy. There is also a Get Task List.vi which help you too.
    I hope this info will help you, let me know if you need more help
    AJJR
    Attachments:
    lvwutil32.zip ‏685 KB

  • I just updated my iPad and don't know how to clear running programs now

    I have just updated my iPad. When I try to delete or stop the programs running I am doing it the way I used to do it before it was updated by double tapping the on/off button. When I do this, it shows the programs I was using on the bottom of the screen. But when I press the icon to look for the minus sign to remove it, it doesn't happen.  iIt just makes that website come up. So, something has changed with the new update but I can't figure it out. Can someone tell me what to do? Thank you.

    Sigh......does no one search to see if anyone else has asked the same question?
    As before, double tap your home button.  You'll see the apps in use on the bottom and a page view of the open version above the app on the bottom.  With your finger, slide the open version of the app upwards towards the top of the iPad and the app will close........

  • How to close my program windows?

    Hey
    One thing I have noticed about apple computers is that you don't just X your programs out, you need to click the program up on the left and click "Close Safari" for example or they don't close correctly, or do they? Because when I just x out my programs / applications I don't know if my macbook closes them? I'm also wondering, if you could x them out, there wouldn't be no option to need to close them which apple computers offer, or by also pressing CMD (Command) plus Q. So I'm just wondering, is it enough by just x'ing or what's this deal about
    Thanks in advance

    Matthew Shamounnia wrote:
    One thing I have noticed about apple computers is that you don't just X your programs out, you need to click the program up on the left and click "Close Safari" for example or they don't close correctly, or do they? Because when I just x out my programs / applications I don't know if my macbook closes them?
    What you are running into is a basic difference between Macs and Windows. In Windows, every application is contained in an enclosing window with its own menu bar. Inside that are the document windows. When you click the X in the enclosing window, you X-out the entire application and it quits. You can also click X in document windows to close them without closing the entire application, but you can always be sure the clicking the X on the application window will always close the application.
    In OS X the enclosing window is optional. This leads to a lot of confusion with new users because of the inconsistency in the user interface. In OS X, some apps use an enclosing window like iPhoto. If you mouse over the red button you see an X, if you click that it works like Windows where the program quits. But some applications like TextEdit do not have an enclosing window so if you click the red button/X you are only closing a window, and the application stays open.
    In general, if it is a single-window application, clicking the red X button closes the entire program; if it is a multiple-window program you must use the Quit command instead. But this is still confusing because you may not have advance knowledge of whether an application is single or multiple window. The user experience on Windows is a bit more consistent in this area.
    To keep things simple on the Mac, it's best to not try and figure out what kind of program it is, forget about whether you should be clicking this or that, and instead just use File/Quit or command-Q to close an app because that works every time.

  • How do I run programs on my Apple products that require Adobe Flash?

    I bought the new iPad 2 weeks ago and can't run most games or videos found on Facebook because Apple won't support Adobe flash. Does Apple have a software app that will allow Facebook, twitter and YouTube videos and games to run on Apple products?  I've found non of my devices (iPod, iPhone and iPad) will run on any of these social sites.

    Twitter has games?
    There are some alternative browsers such as photon, skyfire, etc. that may or may not meet your needs.
    Facebook has its own app on the iPad 2 and apps for several of the games on their site. There is an YouTube app that came with your iPad.

  • How to close appstore and camera ?

    app store and camera always running when i use system monitor even i close from the background ?
    how to close them from processes and what is the processes that usually work in system monitor ??
    it was mail also running but after i delete the iclould account it gone ...
    plz help ...

    Thank you for that link. I bought two tutorial programs for Iphone 4 and that's where I saw that it was adviced to close Safari and other Apps entirely as they were running in the background and in doing so were wearing down on the battery.
    As far as I understand the link you went me Safari and other Apps are kind of closed once I have clicked the Home button so that should be OK.
    However, when I opened a radio program it did not seem to be possible for me to close it down even though I was using the Home button. The music kept playing which of course many times would be great however I would like to know how to close a program when I do not want to use it any more.

  • How to close Safari and Apps entirely?

    I recently got Iphone 4 and have been reading through the manual where I noticed that Safari and other programs are still running in the background if I do not close the programs entirely. I thought all programs were closed once I clicked the 'home' button and opened another program.
    I am not sure exactly how to close Safari or the App programs so I would be grateful to learn about how to do that.
    Thank you.

    Thank you for that link. I bought two tutorial programs for Iphone 4 and that's where I saw that it was adviced to close Safari and other Apps entirely as they were running in the background and in doing so were wearing down on the battery.
    As far as I understand the link you went me Safari and other Apps are kind of closed once I have clicked the Home button so that should be OK.
    However, when I opened a radio program it did not seem to be possible for me to close it down even though I was using the Home button. The music kept playing which of course many times would be great however I would like to know how to close a program when I do not want to use it any more.

Maybe you are looking for

  • GR/IR Account - one for internal vendor and another for external vendors

    Hi Experts, Can I have two GR/IR accounts - one for internal vendors and another for external vendors?  Please let me know. Thank you. with regards, Muthu Ganapathy.

  • JTable in jScrollPane

    Hello, I am developing an application in Netbeans (Swing) with JDBC to connect mySQL. I got a question about a jTable in a jScrollPane. I read from my database and put the resultSet into a dinamical jTable. In the same form, I got a jTextField, where

  • ITunes wont see I have an ipod

    I had to uninstall all of my ipod software to install iTunes and now I installed everything the ipod software and musicmatch (eww) and now I don't want music match but if I uninstall musicmatch my ipod wont tell iTunes it's their. Any idea? I got Ipo

  • GL Balance only display

    Dear all, I am facing the problem how to restrict some users to see line items on specific accounts but they must be able to see the balance on these accounts... Many thanks for your ideas & Brgds. Michal

  • Strange when using BouncyCastle in Java WebStart

    I write a Java Application which can save a PKCS#12 Keystore to a file. The application run well in native mode. But when I use it in Java WebStart, a strange error jumped out, and I don't know why? Here is the Error message: java.io.IOException: exc