Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Ending Task from a batch file ?

Options
  • 08-09-2003 11:12am
    #1
    Moderators, Recreation & Hobbies Moderators, Science, Health & Environment Moderators, Technology & Internet Moderators Posts: 91,761 Mod ✭✭✭✭


    I want to close down a background app (mapisp32) by using a batch file.

    I currently use a batch file to close services Gracefully on an Exchange server (unlike the GUI - the command line does not timeout) and need to close above mentioned app or the information store can take bloody ages to stop.

    Any Ideas ?

    (Mapisp32 is loaded automatically - it's used by the mail server to send reports and notifications)


Comments

  • Registered Users Posts: 931 ✭✭✭moridin


    Use the pskill utility from sysinternals.com :)


  • Moderators, Recreation & Hobbies Moderators, Science, Health & Environment Moderators, Technology & Internet Moderators Posts: 91,761 Mod ✭✭✭✭Capt'n Midnight


    Download PSTools from http://www.sysinternals.com/ntw2k/freeware/pstools.shtml

    [php]
    :Batch file to Kill process %1
    @if [%debug%]==[] @echo off
    if [%1]==[] goto listproc
    pslist>pslist.txt
    Find /i "%1"<pslist.txt>pslist.die
    if not [%debug%]==[] type pslist.die
    for /F "tokens=1-2,3*" %%i in (pslist.die) do echo pskill.exe %%j - to Kill process %%i
    Goto Endd


    :listproc
    pslist

    :endd
    [/php]


  • Registered Users Posts: 931 ✭✭✭moridin


    Lovely little set of utils, NTFSDOS is very very handy too :)


Advertisement