process on windows

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • saby
    New Member
    • Nov 2006
    • 16

    process on windows

    How to check on windows whether a particular process / application is running or not. As we know on unix we use "ps" command to check.

    can I write small C/C++ program to check that?

    Can anyone help me please?
  • Soujiro
    New Member
    • Jan 2007
    • 35

    #2
    Hmm.. I dont want to tell u how ps sources are done, i might be caught by some copyright laws.. but you can use MKS Toolkit for windows linux interoperabilit y functions.. i just dont know where to get it free..

    Comment

    • horace1
      Recognized Expert Top Contributor
      • Nov 2006
      • 1510

      #3
      Originally posted by saby
      How to check on windows whether a particular process / application is running or not. As we know on unix we use "ps" command to check.

      can I write small C/C++ program to check that?

      Can anyone help me please?
      if you install Windows XP Service Pack 2 Support Tools from
      http://www.microsoft.c om/downloads/details.aspx?fa milyid=49AE8576-9BB9-4126-9761-BA8011FABF38&di splaylang=en

      in the command line tools
      http://commandwindows. com/supporttools.ht m
      there is a program pstat.exe which gives information about the processes and drivers that are currently running.
      You could run pstat.exe using the system function, e.g.
      Code:
          system("pstat > pslist.txt");                                         /* call system */
      and then search the output file pslist.txt for what you require

      Comment

      Working...