473,396 Members | 1,852 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,396 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 1309

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

Similar topics

6
by: Saso Zagoranski | last post by:
Hi! I'm trying to run a decryption utility (des), which needs the following parameters: -D-u -k "key" input.file output.file If I run this from the command-prompt it works but when I try to...
15
by: Pohihihi | last post by:
This might sound little stupid to many but I was thinking that when we can use object why we really need event args to pass in any functions e.g. bool MyFunction(object sender, System.EventArgs...
9
by: Sam Marrocco | last post by:
I'm using a ProcessStartInfo object to provide command line information to a process for execution as follows: Dim PSI as new ProcessStartInfo PSI.Filename MyApp.exe PSI.Arguments -blah -blah...
0
by: riccoi | last post by:
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: ...
37
by: Joergen Bech | last post by:
(Slightly religious question): Suppose I have the following class: ---snip--- Public Class MyClass Private _MyVariable As Integer Public Property MyVariable() As Integer Get
2
by: Ben Voigt | last post by:
The C# Language Specification says: A virtual property declaration specifies that the accessors of the property are virtual. The virtual modifier applies to both accessors of a read-write...
7
by: =?Utf-8?B?bWljaGFlbCBzb3JlbnM=?= | last post by:
I am attempting to fetch data from an external process. It seems to work OK with regular arguments, but not with switch arguments. Here is an example of a failure:...
61
by: Sanders Kaufman | last post by:
I'm wondering if I'm doing this right, as far as using another class object as a PHP class property. class my_baseclass { var $Database; var $ErrorMessage; var $TableName; var $RecordSet;...
4
by: melisa | last post by:
I'm writting a method which will start a new specified program and specified file e.g start testdoc.doc with WINWORD.exe as below: private void Start_Process() { ProcessStartInfo startInfo =...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.