473,624 Members | 2,612 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Setting Process.Process Name

I am using the Process class to create a process, and I would like to
set the ProcessName property. The property is read-only and is set to
the name of the EXE.

Is there a way to set the ProcessName?

Nov 22 '05 #1
2 2207

"Randy" <Ra************ *@hotmail.com> wrote in message
news:11******** **************@ o13g2000cwo.goo glegroups.com.. .
I am using the Process class to create a process, and I would like to
set the ProcessName property. The property is read-only and is set to
the name of the EXE.

Is there a way to set the ProcessName?

No, the process name is the name of the executable that you are starting,
why would you want to change this?

Willy.
Nov 22 '05 #2
I am writing a CRON service to schedule the execution of methods on
classes in .NET assemblies. I was using the Process class to create a
new process to execute an executable which invokes the desired method
using reflection. But, I would like to be able to monitor how many
instances of each CRON job are running. So, I thought I would simple
allow each CRON job to name the process; allowing me to easily monitor
the number of instances.

Any suggestions on other approaches would be appreciated?

Nov 22 '05 #3

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

Similar topics

2
435
by: Randy | last post by:
I am using the Process class to create a process, and I would like to set the ProcessName property. The property is read-only and is set to the name of the EXE. Is there a way to set the ProcessName?
8
32986
by: Mohammad-Reza | last post by:
Hi Please tell me how I can find that a process CPU usage like TaskManager. Thanks.
0
2546
by: Gaby | last post by:
Hi all, I’ve made a procedure to find a specific process. This works fine under XP or 2000 but not work under xp embedded. Any idea why? See procedure: static public bool IsRunning(string processname) { processname = processname.ToLower();
4
317
by: web1110 | last post by:
Given a Process, is there a way to get the full path name of the executable?
5
1770
by: kd | last post by:
Hi All, If the name of a process is known, is it possible to check whether it is in execution? What I did was to fetch all the processes running on the system using Process.GetProcesses() and traverse through the array looking for the Process name. Is there a shortcut or easier way to accomplish this?
5
4479
by: Benzi Eilon | last post by:
I have written a C# application which should run as a Windows Service. I must avoid having multiple instances of the application on one machine so I inserted the following code at the beginning of the Main() function: // if this is not the first instance of this application, exit // immediately. Allow only one instance in the system if (Process.GetProcessesByName(Process.GetCurrentProcess().ProcessName).Length > 1)
4
21128
by: Nayan | last post by:
The base process owns this thread. But the visible window is owned by the thread. How do I get the owner Process ID from a Thread ID? To understand, look at this "<<--" pointer in the following code. sample code:
0
1727
by: =?Utf-8?B?Um9i?= | last post by:
I've a requirement to monitor when certain applications are started. I'm using WMI called from VS Stusio 2005 in VB to trap Excel and Word starting. I've written the following console application which wires up 4 events to trap Excel/Word Start/Stop events. The application works fine for Excel but Word behaves strangely. When I start an instance of Word I get the correct message displayed in the console. When I start a second instance of...
5
1812
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 running. I started with an infinite loop that ate up all of my resources, but then added a 2 second pause after every check, which seems to have mostly eliminated the problem of my resources being used up. However, I'm wondering if there is a...
3
1448
by: Reverend Fuzzy | last post by:
Does anyone know off-hand of a quick routine to identify and kill a running process by filename? My goal is to see if "outlook.exe" is still running after it terminates (which it sometimes does), and kill it if it is.
0
8251
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8182
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8635
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7178
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4085
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4188
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2614
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1800
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1496
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.