By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,466 Members | 1,202 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,466 IT Pros & Developers. It's quick & easy.

Remote Process Information

P: n/a
Using WMI I can get the full path of a process on a remote computer:
"SELECT ExecutablePath FROM Win32_Process"

Without wmi I can get theprocessname and id:
For Each ps In System.Diagnostics.Process.GetProcesses(PC.Name)
processgrid.Rows.Add(ps.ProcessName, ps.Id)
Next ps

Any ideas how I can get the process path (using vb 2005)

Thanks,
Pete.

Sep 19 '07 #1
Share this Question
Share on Google+
7 Replies


P: n/a
RB
xla76 wrote:
Using WMI I can get the full path of a process on a remote computer:
"SELECT ExecutablePath FROM Win32_Process"

Without wmi I can get theprocessname and id:
For Each ps In System.Diagnostics.Process.GetProcesses(PC.Name)
processgrid.Rows.Add(ps.ProcessName, ps.Id)
Next ps

Any ideas how I can get the process path (using vb 2005)

Thanks,
Pete.
I think ps.StartInfo.FileName returns the full path.

HTH,

RB.
Sep 19 '07 #2

P: n/a
On Sep 19, 12:03 pm, RB <owmdkbqziki...@mailinator.comwrote:
xla76 wrote:
Using WMI I can get the full path of a process on a remote computer:
"SELECT ExecutablePath FROM Win32_Process"
Without wmi I can get theprocessname and id:
For Each ps In System.Diagnostics.Process.GetProcesses(PC.Name)
processgrid.Rows.Add(ps.ProcessName, ps.Id)
Next ps
Any ideas how I can get the process path (using vb 2005)
Thanks,
Pete.

I think ps.StartInfo.FileName returns the full path.

HTH,

RB.
I tried that, but it only returned a bunch of zero length strings.

Sep 19 '07 #3

P: n/a
RB
xla76 wrote:
On Sep 19, 12:03 pm, RB <owmdkbqziki...@mailinator.comwrote:
>xla76 wrote:
>>Using WMI I can get the full path of a process on a remote computer:
"SELECT ExecutablePath FROM Win32_Process"
Without wmi I can get theprocessname and id:
For Each ps In System.Diagnostics.Process.GetProcesses(PC.Name)
processgrid.Rows.Add(ps.ProcessName, ps.Id)
Next ps
Any ideas how I can get the process path (using vb 2005)
Thanks,
Pete.
I think ps.StartInfo.FileName returns the full path.

HTH,

RB.

I tried that, but it only returned a bunch of zero length strings.
Okey dokey,

Have you tried ps.MainModule.FileName?

(http://msdn2.microsoft.com/en-us/lib...e_members.aspx)

Cheers,

RB.
Sep 19 '07 #4

P: n/a
On 19 Sep, 14:34, RB <owmdkbqziki...@mailinator.comwrote:
xla76 wrote:
On Sep 19, 12:03 pm, RB <owmdkbqziki...@mailinator.comwrote:
xla76 wrote:
Using WMI I can get the full path of a process on a remote computer:
"SELECT ExecutablePath FROM Win32_Process"
Without wmi I can get theprocessname and id:
For Each ps In System.Diagnostics.Process.GetProcesses(PC.Name)
processgrid.Rows.Add(ps.ProcessName, ps.Id)
Next ps
Any ideas how I can get the process path (using vb 2005)
Thanks,
Pete.
I think ps.StartInfo.FileName returns the full path.
HTH,
RB.
I tried that, but it only returned a bunch of zero length strings.

Okey dokey,

Have you tried ps.MainModule.FileName?

(http://msdn2.microsoft.com/en-us/lib...tics.processmo...)

Cheers,

RB.
I Tried it but got: feature is not supported for remote machines!

Sep 19 '07 #5

P: n/a
On Sep 19, 4:12 pm, xla76 <xla...@gmail.comwrote:
On 19 Sep, 14:34, RB <owmdkbqziki...@mailinator.comwrote:
xla76 wrote:
On Sep 19, 12:03 pm, RB <owmdkbqziki...@mailinator.comwrote:
>xla76 wrote:
>>Using WMI I can get the full path of a process on a remote computer:
>> "SELECT ExecutablePath FROM Win32_Process"
>>Without wmi I can get theprocessname and id:
>> For Each ps In System.Diagnostics.Process.GetProcesses(PC.Name)
>> processgrid.Rows.Add(ps.ProcessName, ps.Id)
>> Next ps
>>Any ideas how I can get the process path (using vb 2005)
>>Thanks,
>>Pete.
>I think ps.StartInfo.FileName returns the full path.
>HTH,
>RB.
I tried that, but it only returned a bunch of zero length strings.
Okey dokey,
Have you tried ps.MainModule.FileName?
(http://msdn2.microsoft.com/en-us/lib...tics.processmo...)
Cheers,
RB.

I Tried it but got: feature is not supported for remote machines!
So, back to WMI then?

Sep 20 '07 #6

P: n/a
RB
xla76 wrote:
On Sep 19, 4:12 pm, xla76 <xla...@gmail.comwrote:
>On 19 Sep, 14:34, RB <owmdkbqziki...@mailinator.comwrote:
>>xla76 wrote:
On Sep 19, 12:03 pm, RB <owmdkbqziki...@mailinator.comwrote:
xla76 wrote:
>Using WMI I can get the full path of a process on a remote computer:
> "SELECT ExecutablePath FROM Win32_Process"
>Without wmi I can get theprocessname and id:
> For Each ps In System.Diagnostics.Process.GetProcesses(PC.Name)
> processgrid.Rows.Add(ps.ProcessName, ps.Id)
> Next ps
>Any ideas how I can get the process path (using vb 2005)
>Thanks,
>Pete.
I think ps.StartInfo.FileName returns the full path.
HTH,
RB.
I tried that, but it only returned a bunch of zero length strings.
Okey dokey,
Have you tried ps.MainModule.FileName?
(http://msdn2.microsoft.com/en-us/lib...tics.processmo...)
Cheers,
RB.
I Tried it but got: feature is not supported for remote machines!

So, back to WMI then?
The only other suggestion I can think of is to create a service on the
remote machine that would report back the list of processes running on
the remote machine.

Actually, that would be quite cool - you could make it a web-service and
then query it from any computer through a web-based interface as well as
from your application :-) Um - don't know if that's what you want though!!

Cheers,

RB.
Sep 21 '07 #7

P: n/a
On Sep 21, 10:48 am, RB <owmdkbqziki...@mailinator.comwrote:
xla76 wrote:
On Sep 19, 4:12 pm, xla76 <xla...@gmail.comwrote:
On 19 Sep, 14:34, RB <owmdkbqziki...@mailinator.comwrote:
>xla76 wrote:
On Sep 19, 12:03 pm, RB <owmdkbqziki...@mailinator.comwrote:
xla76 wrote:
Using WMI I can get the full path of a process on a remote computer:
"SELECT ExecutablePath FROM Win32_Process"
Without wmi I can get theprocessname and id:
For Each ps In System.Diagnostics.Process.GetProcesses(PC.Name)
processgrid.Rows.Add(ps.ProcessName, ps.Id)
Next ps
Any ideas how I can get the process path (using vb 2005)
Thanks,
Pete.
I think ps.StartInfo.FileName returns the full path.
HTH,
RB.
I tried that, but it only returned a bunch of zero length strings.
Okey dokey,
Have you tried ps.MainModule.FileName?
(http://msdn2.microsoft.com/en-us/lib...tics.processmo...)
Cheers,
RB.
I Tried it but got: feature is not supported for remote machines!
So, back to WMI then?

The only other suggestion I can think of is to create a service on the
remote machine that would report back the list of processes running on
the remote machine.

Actually, that would be quite cool - you could make it a web-service and
then query it from any computer through a web-based interface as well as
from your application :-) Um - don't know if that's what you want though!!

Cheers,

RB.
Thanks for your efforts RB, but I just wanted a method of reading/
controlling processes as and when required, so a service would be
overkill (and over my head at the minute - though I will look into it
at some stage).

Regards
Pete

Sep 22 '07 #8

This discussion thread is closed

Replies have been disabled for this discussion.