471,624 Members | 1,878 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

Property Arguments of ProcessStartInfo class is always empty

Hi.

I had created a Windows Application ant put there the code down there. I am
trying to get information about the processes that are currently running in
my machine.

The problem is: "Arguments" property is always an empty string (the same
happens to "Filename" property).

Could it be a permission problem? My pc is running Windows XP SP1 and I
always run the application logged with a user that belongs to the
"Administrators" group, so he is an administrator.

I would appreciate some help.

Thank you.
Ric
===============================================

private void Form1_Load(object sender, System.EventArgs e)
{

DataTable dt = new DataTable();

dt.Columns.Add("col1");
dt.Columns.Add("col2");
dt.Columns.Add("col3");
dt.Columns.Add("col4");
dt.Columns.Add("col5");
dt.Columns.Add("col6");

dataGrid1.DataSource = dt;

Process[] procs = System.Diagnostics.Process.GetProcesses();

foreach(Process p in procs) {

dt.Rows.Add(new object[6] { p.ProcessName, p.StartInfo.FileName,

p.StartInfo.Arguments, p.MainWindowTitle,
p.Threads.Count,

p.StartInfo.WorkingDirectory });

}

dataGrid1.Refresh();

}

Jul 21 '05 #1
0 1250

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Saso Zagoranski | last post: by
15 posts views Thread by Pohihihi | last post: by
9 posts views Thread by Sam Marrocco | last post: by
2 posts views Thread by Ben Voigt | last post: by
7 posts views Thread by =?Utf-8?B?bWljaGFlbCBzb3JlbnM=?= | last post: by
61 posts views Thread by Sanders Kaufman | last post: by
1 post views Thread by XIAOLAOHU | last post: by
reply views Thread by leo001 | last post: by

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.