I did search this site and found many references to the task manager so I feel this is a relevant perl question. Eg. (http://www.perlmonks.com/index.pl?node_id=21069&lastnode_id=864) However, all the references I found only gave solutions on how to get the processes list that is part of what the task manager displays. I wanted the applications list from the task manger. I wanted all this via perl on win 2k adv server.
What I really want: I am trying to make sure that one and only one instance of my script is run at a time. When viewing the processes list, gained from the link above, all I get is a list of perl.exe's and cmd.exe's running. I do not see the script name. That script name is displayed in the task manager's applications list however. So can anyone help me access that list?
Currently I am using "tlist.exe", (which does display the script name), but I would rather use all perl code.
Loginprompt
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.