Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.
Hi all, please see this major site announcement: https://www.boards.ie/discussion/2058427594/boards-ie-2026

Ending Task from a batch file ?

  • 08-09-2003 10:12AM
    #1
    Moderators, Recreation & Hobbies Moderators, Science, Health & Environment Moderators, Technology & Internet Moderators Posts: 97,540 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, Registered Users 2 Posts: 931 ✭✭✭moridin


    Use the pskill utility from sysinternals.com :)


  • Moderators, Recreation & Hobbies Moderators, Science, Health & Environment Moderators, Technology & Internet Moderators Posts: 97,540 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, Registered Users 2 Posts: 931 ✭✭✭moridin


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


Advertisement
Advertisement