NodeReaper has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re: task manager application list
by loginprompt (Initiate) on Dec 06, 2001 at 23:23 UTC
    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

      Not surprisingly, merlyn has already written something that allows only a single instance of a script, aptly named Highlander. There can be only one!

       

      perl -e 's&&rob@cowsnet.com.au&&&split/[@.]/&&s&.com.&_&&&print'