Author Topic: How to know number program running  (Read 3526 times)

0 Members and 1 Guest are viewing this topic.

Adesu

  • Guest
How to know number program running
« on: February 08, 2007, 01:39:25 AM »
Hi Alls,
How to know or check number program still running, as look in show desktop,look at attach file.

Adesu

  • Guest
Re: How to know number program running
« Reply #1 on: February 08, 2007, 02:43:01 AM »
Hi
I mean to know name program still running with autolisp,then the result
(alert (strcat "\nIn your desktop still running program"
      "\n"
      "\nNo 1  = Outlook Express"
      "\nNo 2  = Window Explorer"
      "\nNo 3  = AutoCad 2005"))





Hi Alls,
How to know or check number program still running, as look in show desktop,look at attach file.

Patrick_35

  • Guest
Re: How to know number program running
« Reply #2 on: February 09, 2007, 10:13:46 AM »
Hi
Try this

Code: [Select]
(defun appli(/ apps item lst meth1 meth2 WMI)
  (setq WMI (vlax-create-object "WbemScripting.SWbemLocator")
        meth1 (vlax-invoke WMI 'ConnectServer nil nil nil nil nil nil nil nil)
        meth2 (vlax-invoke meth1 'ExecQuery "Select * from Win32_Process"))
  (vlax-for item meth2
    (setq lst (append lst (list (vlax-get item 'CommandLine))))
  )
  (vlax-release-object WMI)
  (vlax-release-object meth1)
  (vlax-release-object meth2)
  (vl-remove nil lst)
)

@+

Adesu

  • Guest
Re: How to know number program running
« Reply #3 on: February 12, 2007, 04:10:08 AM »
Hi Patrick,
Yes that right,as I looking for,thanks for your help.

Hi
Try this

Code: [Select]
(defun appli(/ apps item lst meth1 meth2 WMI)
  (setq WMI (vlax-create-object "WbemScripting.SWbemLocator")
        meth1 (vlax-invoke WMI 'ConnectServer nil nil nil nil nil nil nil nil)
        meth2 (vlax-invoke meth1 'ExecQuery "Select * from Win32_Process"))
  (vlax-for item meth2
    (setq lst (append lst (list (vlax-get item 'CommandLine))))
  )
  (vlax-release-object WMI)
  (vlax-release-object meth1)
  (vlax-release-object meth2)
  (vl-remove nil lst)
)

@+