WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Process ID

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Remote Process List

Keywords:   remote process list	 tBrowseCntrs

Question:

tBrowseCntrs function can retrieve a list of running processes and related information. Is there a way to have something like tlistproc on a remote machine. I would like to have a list of all running processes but without a GUI like tBrowseCntrs.

Answer:

tListProc doesn't support specifying a remote machine.

You could run some kind of commandline utility that grabs a list of remote processes.

OR

You could (maybe) write a script, then using the AT command (or the SOON command in the NT resource kit) schedule the script to run on the remote machine and then somehow have it report back what it found.


OR You could use the following WMI code to grab a list of remote processes....
username = ""
password = ""
list = ""
computername="SEPTOR"
Locator = ObjectOpen("WbemScripting.SWbemLocator")
Service = Locator.ConnectServer(computername,"root/cimv2",username,password)
Security = Service.Security_
Security.ImpersonationLevel = 3
Instance = Service.InstancesOf("win32_process")
hEnum = ObjectCollectionOpen(Instance)

While 1
  Obj = ObjectCollectionNext(hEnum)
  If Obj == 0 Then Break
  list = StrCat(list,@tab,Obj.name)
EndWhile

list = StrTrim(list)
AskItemList("Remote processes",list,@tab,@unsorted,@single)
ObjectCollectionClose(hEnum)
ObjectClose(Instance)
ObjectClose(Security)
ObjectClose(Service)
ObjectClose(Locator)
exit

Article ID:   W15079
File Created: 2017:07:28:13:58:39
Last Updated: 2002:09:05:13:49:26