Re: how to determine if an app is running

Tech-Archive recommends: Fix windows errors by optimizing your registry



Hi Brad,

you're looking for calls to list all active processes
like the Task manager does. This can be done by
WMI for example.

Find running CALC.exe processes:

oWMI = GETOBJECT('winmgmts://')
cQuery = "select * from win32_process where name='calc.exe'"
oResult = oWMI.ExecQuery(cQuery)
? oResult.Count
FOR EACH oProcess IN oResult
? oProcess.ProcessId NEXT

With the processID you should be able to find and
activate it's window.

The other thing you mentioned, eg pulling each
window to top and checking if it's the one wanted-
I think you found examples sing enumwindows or
FindWindwo. I don't think the codes you normally
find activate all windows. But one disadvantage
is they find an app by it's window title. In germany
for CALC exe that is "Rechner" for example, not
Calc or Calculator.

Bye, Olaf.
.



Relevant Pages

  • Re: WMI wouldnt start. My fix.
    ... >it) that WMI was dependent on it, ... >On the launch permissions, where you have ... the Default Com Security tab is now called ... remember to click OK on the relevant window) ...
    (microsoft.public.windowsxp.wmi)
  • Re: DCOM/WMI/RPC system Info problem
    ... The difference in my case is that DCOM is entirely ... WMI wouldn't start. ... I checked permissions on my drive and my registry ... >9) close the window with OK, then click on the MSDTC tab ...
    (microsoft.public.windowsxp.general)
  • WMI wouldnt start. My fix.
    ... >Local Activation permission for the COM Server ... WMI wouldn't start. ... >>on..using the Dependencies tab in it's service. ... >>9) close the window with OK, then click on the MSDTC tab ...
    (microsoft.public.windowsxp.wmi)
  • Re: WMI wouldnt start. My fix.
    ... WMI says not found) I followed your advice and things are now fixed. ... I checked permissions on my drive and my registry ... > on..using the Dependencies tab in it's service. ... > 9) close the window with OK, then click on the MSDTC tab ...
    (microsoft.public.windowsxp.wmi)
  • WMI wouldnt start. My fix.
    ... Local Activation permission for the COM Server ... WMI wouldn't start. ... >on..using the Dependencies tab in it's service. ... >9) close the window with OK, then click on the MSDTC tab ...
    (microsoft.public.windowsxp.wmi)