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
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Ending Task from a batch file ?

  • 08-09-2003 10:12am
    #1
    Moderators, Recreation & Hobbies Moderators, Science, Health & Environment Moderators, Technology & Internet Moderators Posts: 94,272 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: 94,272 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