I'm looking for a way to kill an application in Windows NT. I found the code for killing a process, but this kills more than I want.

Here is my underlying problem: I'm running an application in batch. Because my flexlm license is about to expire, the application sends out a warning message window. When running the application interactively it is a simple thing to just click on the OK button and procede. However, when I'm running in batch it can't always be at my computer to do that, which means my job hangs. My batch job calls this application several times with different input files, so I need to keep killing the warning message about every 15 minutes. So I'm wanting to write a simple program that will look for the application that displays the warning message and kill it if it exists. I can then put this program in the scheduled tasks and just have it look every minute or so. My basic problem is that I don't know the Win32 system calls to obtain the applications list and to kill the application. I assume it is similar to obtaining and killing a process.

Any assistance in this regard would be greatly apprecaited.

the rookie


In reply to Killing an Application in Windows NT by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.