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

Remote Process Listing

P: n/a

I'm using the below code to display a list of processes running on a remote
machine. The code successfully grabs five or six of the processes before
getting an error that says "feature is not supported for remote machines". If
the feature isn't supported for remote machines then why is able to grab some
of the processes before getting the error? Also, I've use the
process.getprocessname successfully on remote machines to search for
instances of a particular process and had no problems. Any ideas?
Dim P As Process
Dim strProcessName As String
Dim shtNameLength As Short
Dim strServer As String
Dim strProcessList As String

For Each P In Process.GetProcesses(strServer)
strProcessName = P.ToString
strProcessName = strProcessName.Remove(0, 28)
shtNameLength = strProcessName.Length
shtNameLength = shtNameLength - 1
strProcessName = strProcessName.Remove(shtNameLength, 1)
strProcessList &= strProcessName & Environment.NewLine
MessageBox.Show(Err.Description, "Error Gathering Processes",
MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try

txt1.Text = strProcessList

Apr 6 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.