Re: list running applications

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



Hi,
I don't want to list the processes. I need to know what applications are
opened.
Eg. Abc.xls, 123.doc
any way to achieve this?

"Gerry Hickman" <gerry666uk@xxxxxxxxxxx> wrote in message
news:uGEQMfenGHA.1208@xxxxxxxxxxxxxxxxxxxxxxx
Hi Lynn,

Try this one.

// Win32_Process.js
// List processes using WMI

var strCmp = ".";
var strNamespace = "root\\cimv2";
var oLoc = new ActiveXObject("WbemScripting.SWbemLocator");
var oSvc = oLoc.ConnectServer(strCmp, strNamespace);
if (!oSvc) {
trace("Can't Connect!");
WScript.Quit(1);
}


var oSWbemObjectSet = oSvc.InstancesOf("Win32_Process");
var e = new Enumerator(oSWbemObjectSet);
for(;!e.atEnd();e.moveNext()) {
var oThisProcess = e.item();
trace(oThisProcess.Name);
}

function trace(strMsg) {
WScript.Echo(strMsg);
}

Lynn wrote:
Hi,
Anyone has the code to list the applications that are running on a
remote
computer?
thanks




--
Gerry Hickman (London UK)


.



Relevant Pages

  • Re: How to shut down a running application
    ... Andrew ... >> I'm trying to close applications that are not necessarily Delphi ... > You can found ClassName with, for examle, WinDowse, ...
    (borland.public.delphi.thirdpartytools.general)
  • Re: list running applications
    ... // List processes using WMI ... var oSvc = oLoc.ConnectServer; ... var e = new Enumerator; ...
    (microsoft.public.win32.programmer.wmi)