Killing an Application/Process via a Batch File

Archived from groups: microsoft.public.windowsxp.security_admin (More info?)

G'Day,
I want to limit a child's access to a game to certain times.
It's only a simple Application, so I thought two Batch Files may work:
1. To extract the Program Files from a ZIP (she's not yet savvy enough to do
this herself).
2. To delete the Program Files.
By running these two files via Task Scheduler I'd be able to regulate her
access.

However, if she's still playing the game at the time the program files are
to be deleted, I assume that this idea won't work (i.e. can't delete a file
in use).

So can anyone help me kill the actual application/process through a Batch
File?

Or has anyone got a better method altogether?

Cheers.
2 answers Last reply
More about killing application process batch file
  1. Archived from groups: microsoft.public.windowsxp.security_admin (More info?)

    Michael wrote:

    > G'Day,
    > I want to limit a child's access to a game to certain times.
    > It's only a simple Application, so I thought two Batch Files may work:
    > 1. To extract the Program Files from a ZIP (she's not yet savvy enough to do
    > this herself).
    > 2. To delete the Program Files.
    > By running these two files via Task Scheduler I'd be able to regulate her
    > access.
    >
    > However, if she's still playing the game at the time the program files are
    > to be deleted, I assume that this idea won't work (i.e. can't delete a file
    > in use).
    >
    > So can anyone help me kill the actual application/process through a Batch
    > File?
    Hi

    A)
    If you have Windows XP Professional the builtin taskkill.exe
    is an option. In a command prompt, run taskkill.exe /? for help.


    B)
    Some freeware command line tools that can be used for Windows XP Home/Pro:

    PsKill.exe in the free PsTools suite at
    http://www.sysinternals.com/

    Cmdow.exe
    http://www.commandline.co.uk/cmdow/index.html


    --
    torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
    Administration scripting examples and an ONLINE version of
    the 1328 page Scripting Guide:
    http://www.microsoft.com/technet/scriptcenter/default.mspx
  2. Archived from groups: microsoft.public.windowsxp.security_admin (More info?)

    "Torgeir Bakken (MVP)" <Torgeir.Bakken-spam@hydro.com> wrote in message
    news:ulRLQEJKFHA.3908@TK2MSFTNGP10.phx.gbl...
    > Michael wrote:
    >
    >> G'Day,
    >> I want to limit a child's access to a game to certain times.
    >> It's only a simple Application, so I thought two Batch Files may work:
    >> 1. To extract the Program Files from a ZIP (she's not yet savvy enough to
    >> do this herself).
    >> 2. To delete the Program Files.
    >> By running these two files via Task Scheduler I'd be able to regulate her
    >> access.
    >>
    >> However, if she's still playing the game at the time the program files
    >> are to be deleted, I assume that this idea won't work (i.e. can't delete
    >> a file in use).
    >>
    >> So can anyone help me kill the actual application/process through a Batch
    >> File?
    > Hi
    >
    > A)
    > If you have Windows XP Professional the builtin taskkill.exe
    > is an option. In a command prompt, run taskkill.exe /? for help.
    >
    >
    > B)
    > Some freeware command line tools that can be used for Windows XP Home/Pro:
    >
    > PsKill.exe in the free PsTools suite at
    > http://www.sysinternals.com/
    >
    > Cmdow.exe
    > http://www.commandline.co.uk/cmdow/index.html
    >
    >
    > --
    > torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
    > Administration scripting examples and an ONLINE version of
    > the 1328 page Scripting Guide:
    > http://www.microsoft.com/technet/scriptcenter/default.mspx

    Thanks. Big help.
Ask a new question

Read More

Windows XP