function GetProcessName(){ var loc = new ActiveXObject("WbemScripting.SWbemLocator"); var svc = loc.ConnectServer(".", "root\\cimv2"); coll = svc.ExecQuery("select * from Win32_Process"); var items = new Enumerator(coll); while (!items.atEnd()) { WScript.Echo(items.item().Name); items.moveNext(); } }