Help Please !! List Processes on a Remote Computer

Started by freedom45, July 08, 2013, 04:59:30 PM

Previous topic - Next topic

freedom45

Hi all,

I am trying to list processes on a remote computer.  I found this sample code.  It does work on some computers, but it fails on others PC and I cannot find why ?

I am getting the following error code "3131 OleExecute: Not a valid OLE object. Period may have been used in place of a comma."

Here is the code that I found on the Winbatch Teck DB.  ==> http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/nftechsupt.web+WinBatch/WMI+List~Processes~on~a~Remote~Computer.txt

Could anyone please let me know if there is another way to get a list processes on a remote computer ?

A PrintScreen of the error as been attached to this topic.

Thanks very much in advance for your help,
Dan

freedom45

Hi,

I also found this article, works when running on locally but it does not work for remote computers.

Running this code on my laptop to get the list of processes on remote Windows 7(X32) or Windows 8(X64) but it does not work.  I am using the same administrator account on all computers.

Can anyone let me know what I would need to change in this code to get the list of processes running on remote computers.
Thanks,
Dan

============================================

Status of Process on Remote Machine
--------------------------------------------------------------------------------
Question:
Can I write a script that checks if a process is running on another machine on my network? How? 
Answer:
See the Process extender. AddExtender("wwprc44i.dll")

machine = "\\RemoteMachine" ;Note: the user must have the necessary access permissions.
procname = "notepad"
counterstring = StrCat(machine,"\Process(",procname,")\ID Process")

ErrorMode(@off)
dat=tGetData(counterstring,0)
ErrorMode(@Cancel)
if dat == 0
   Message(procname, "Process IS NOT running !..")
else
   Message(procname, "Process IS running..")
endif
exit
--------------------------------------------------------------------------------
Article ID:   W15864
File Created: 2010:02:17:11:58:23
Last Updated: 2013:04:01:09:11:53

Deana

Quote from: freedom45 on July 08, 2013, 04:59:30 PM
Hi all,

I am trying to list processes on a remote computer.  I found this sample code.  It does work on some computers, but it fails on others PC and I cannot find why ?

I am getting the following error code "3131 OleExecute: Not a valid OLE object. Period may have been used in place of a comma."

Here is the code that I found on the Winbatch Teck DB.  ==> http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/nftechsupt.web+WinBatch/WMI+List~Processes~on~a~Remote~Computer.txt

Could anyone please let me know if there is another way to get a list processes on a remote computer ?

A PrintScreen of the error as been attached to this topic.

Thanks very much in advance for your help,
Dan

This method attempts to use WMI to access a remote system. I suspect the connect to the remote server is failing and returning an invalid object which then causes the security statement to fail. I recommend trying to connect tot he remote server using windows built in WMI tools. See: http://msdn.microsoft.com/en-us/library/windows/desktop/aa394603(v=vs.85).aspx
Deana F.
Technical Support
Wilson WindowWare Inc.

Deana

Quote from: freedom45 on July 08, 2013, 06:13:24 PM
Hi,

I also found this article, works when running on locally but it does not work for remote computers.

Running this code on my laptop to get the list of processes on remote Windows 7(X32) or Windows 8(X64) but it does not work.  I am using the same administrator account on all computers.

Can anyone let me know what I would need to change in this code to get the list of processes running on remote computers.
Thanks,
Dan

============================================

Status of Process on Remote Machine
--------------------------------------------------------------------------------
Question:
Can I write a script that checks if a process is running on another machine on my network? How? 
Answer:
See the Process extender. AddExtender("wwprc44i.dll")

machine = "\\RemoteMachine" ;Note: the user must have the necessary access permissions.
procname = "notepad"
counterstring = StrCat(machine,"\Process(",procname,")\ID Process")

ErrorMode(@off)
dat=tGetData(counterstring,0)
ErrorMode(@Cancel)
if dat == 0
   Message(procname, "Process IS NOT running !..")
else
   Message(procname, "Process IS running..")
endif
exit
--------------------------------------------------------------------------------
Article ID:   W15864
File Created: 2010:02:17:11:58:23
Last Updated: 2013:04:01:09:11:53

An administrative account doesn't mean that it will have unfettered access to a remote system. Try clicking on the 'More Error Info' button on any error dialog, it might contain extended error information. Or try using DebugTrace. Simply add DebugTrace(@on,"trace.txt") to the beginning of the script and inside any UDF, run it until the error or completion, then inspect the resulting trace file for clues as to the problem

Feel free to post the trace file here ( removing any private info) if you need further assistance.
Deana F.
Technical Support
Wilson WindowWare Inc.