Re: list running applications
- From: "Lynn" <MarryLynn@xxxxxxxxx>
- Date: Sat, 8 Jul 2006 00:26:55 +0800
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,remote
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
computer?
thanks
--
Gerry Hickman (London UK)
.
- Follow-Ups:
- Re: list running applications
- From: Jason Gurtz
- Re: list running applications
- References:
- list running applications
- From: Lynn
- Re: list running applications
- From: Gerry Hickman
- list running applications
- Prev by Date: Re: WMI:0x80070005(DCOM ACCESS_DENIED)
- Next by Date: Re: list running applications
- Previous by thread: Re: list running applications
- Next by thread: Re: list running applications
- Index(es):
Relevant Pages
|