473,405 Members | 2,404 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Process.Getprocesses() problem

Hi,
I try
Process [] remoteByName = Process.GetProcesses();
it works
but when I try
Process [] remoteByName = Process.GetProcesses("localhost");
it fails with invalid operation
please Help me!
Threre is no way to find help on the internet, i am desesperate.
../Jane
Nov 16 '05 #1
5 6849
"localhost" is not a valid machine name.
Use the real machine name:
.....= Process.GetProcesses(Environment.MachineName);

Willy.

"Jane" <Ja**@discussions.microsoft.com> wrote in message
news:EC**********************************@microsof t.com...
Hi,
I try
Process [] remoteByName = Process.GetProcesses();
it works
but when I try
Process [] remoteByName = Process.GetProcesses("localhost");
it fails with invalid operation
please Help me!
Threre is no way to find help on the internet, i am desesperate.
./Jane

Nov 16 '05 #2
Hi Jane,

Try this,

Process ThisProcess = Process.GetCurrentProcess();

Process[] AllProcess = Process.GetProcessesByName(ThisProcess.ProcessName );

Harris.

--
Message posted via http://www.dotnetmonster.com
Nov 16 '05 #3
Hi Willy,
Thank you for your answer
ok it is working my computer name but with a remote computer name it fails:
for example:
Process [] remoteByName = Process.GetProcesses("hlshfmpp05");
hlshfmpp05 is a remote machine and I am administrator on it.

Do you have any Idea?
for me it is a security problem but I do'nt know what to configure!
thx

"Willy Denoyette [MVP]" wrote:
"localhost" is not a valid machine name.
Use the real machine name:
.....= Process.GetProcesses(Environment.MachineName);

Willy.

"Jane" <Ja**@discussions.microsoft.com> wrote in message
news:EC**********************************@microsof t.com...
Hi,
I try
Process [] remoteByName = Process.GetProcesses();
it works
but when I try
Process [] remoteByName = Process.GetProcesses("localhost");
it fails with invalid operation
please Help me!
Threre is no way to find help on the internet, i am desesperate.
./Jane


Nov 16 '05 #4


"Jane" <Ja**@discussions.microsoft.com> wrote in message
news:69**********************************@microsof t.com...
Hi Willy,
Thank you for your answer
ok it is working my computer name but with a remote computer name it
fails:
for example:
Process [] remoteByName = Process.GetProcesses("hlshfmpp05");
hlshfmpp05 is a remote machine and I am administrator on it.

Do you have any Idea?
for me it is a security problem but I do'nt know what to configure!
thx

Not sure what error you got, but I'm pretty sure that you are NOT running
your code as an administrator on "hlshfmpp05".

Willy.
Nov 16 '05 #5
You are right!
I am running the code on HLSSERVERPP01 as domain administrator!
I try to get all HLSHFMPP05 process from HLSERVERPP01.

thx
"Willy Denoyette [MVP]" wrote:


"Jane" <Ja**@discussions.microsoft.com> wrote in message
news:69**********************************@microsof t.com...
Hi Willy,
Thank you for your answer
ok it is working my computer name but with a remote computer name it
fails:
for example:
Process [] remoteByName = Process.GetProcesses("hlshfmpp05");
hlshfmpp05 is a remote machine and I am administrator on it.

Do you have any Idea?
for me it is a security problem but I do'nt know what to configure!
thx

Not sure what error you got, but I'm pretty sure that you are NOT running
your code as an administrator on "hlshfmpp05".

Willy.

Nov 16 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Denis Brkljacic | last post by:
Hi, I have made some simple ASP.NET (C#) application, that somewhere uses this command: Process aProcesses = Process.GetProcesses(Environment.MachineName); This command purpose is to find...
2
by: alvis | last post by:
hi i have a windows service that uses an excell workbook when i create the excell app i cant distroy it after i am finished i am using this code whats wrong? thanks Dim processes1(), p1 As...
1
by: Roger | last post by:
When looking through the list created by the System.Diagnositc.Process.GetProcesses and verifying it with the Task Manager Process list. There are items in the Task Manager Process list that are...
7
by: Gamma | last post by:
I'm trying to create a ListBox that holds list of currently running processes. So I inherited from Process a classes named _Process, which it's objects are to be held in the ListBox (I just...
1
by: Chris | last post by:
Hello, I have a Windows Forms application which has buttons to click to run other programs. One of the applications it must run is a ClickOnce Windows Forms application, so the Application...
4
by: =?Utf-8?B?Q2hyaXM=?= | last post by:
I know I can use this code to start a process. Any aimilar way to end one? System.Diagnostics.Process.Start("EcpKpScript_01.exe");
3
by: =?Utf-8?B?Q2hyaXM=?= | last post by:
I am using the following code to see if a process is currently running. I want to do something if it is NOT running. I am having trouble testing the array when no process is runing. Null won't...
0
by: 5000wpm | last post by:
"couldn't get process information from remote machine" - Access denied Using VS2003 VB.NET 1.1 under Windows XP Pro x64. Hi, Having recently upgraded to Windows XP Pro x64 a problem has...
5
by: ags5406 | last post by:
I've a Windows Service that keeps a particular executable running. If the executable fails for whatever reason, the Service restarts it. Right now I'm using a loop to check if the process is...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.