473,569 Members | 2,845 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to set process name/description?

mdb
When I view my running processes with SysInternals Process Explorer, most of
the processes have actual names (called "Descriptio n" in Process Explorer)
and Company Names set for the process. Mine (a .NET windows service) does
not. Anyone know how I can set this value?

--
-mdb
Nov 17 '05 #1
4 13598
Have you created an installer class in the service? Something like
this:

/// <summary>
/// Summary description for ServiceRegister .
/// </summary>
[RunInstaller(tr ue)]
public class ServiceRegister : System.Configur ation.Install.I nstaller
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.Componen tModel.Containe r components = null;
private ServiceInstalle r serviceInstalle r;
private ServiceProcessI nstaller processInstalle r;

public ServiceRegister ()
{
// This call is required by the Designer.
InitializeCompo nent();

// define and create the service installer
serviceInstalle r = new ServiceInstalle r();
serviceInstalle r.StartType = ServiceStartMod e.Manual;
serviceInstalle r.ServiceName = ServiceControl. ServiceControlN ame;
serviceInstalle r.DisplayName = ServiceControl. ServiceControlD esc;
Installers.Add( serviceInstalle r);

// define and create the process installer
processInstalle r = new ServiceProcessI nstaller();
#if RUNUNDERSYSTEM
processInstalle r.Account = ServiceAccount. LocalSystem;
#else
//use the local system account
processInstalle r.Account = ServiceAccount. LocalSystem;

// should prompt for user on install
//processInstalle r.Account = ServiceAccount. User;
//processInstalle r.Username = null;
//processInstalle r.Password = null;
#endif
Installers.Add( processInstalle r);
}

#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeCompo nent()
{
components = new System.Componen tModel.Containe r();
}
#endregion
}

Nov 17 '05 #2
mdb
"steve" <st*******@hotm ail.com> wrote in
news:11******** **************@ o13g2000cwo.goo glegroups.com:
Have you created an installer class in the service? Something like
this:
serviceInstalle r.ServiceName =
ServiceControl. ServiceControlN ame;
serviceInstalle r.DisplayName =
ServiceControl. ServiceControlD esc;


Yes. Those are used in the Services Control Panel and stored in the
Registry, but apparently are not used for the names of processes that are
actually running. I'm referring to the 'Description' and 'Company Name'
fields found in SysInternals Process Explorer (these bits of information are
apparently NOT available in standard Task Manager.) You can get Process
Explorer at http://www.sysinternals.com/Utilitie...sExplorer.html

--
-mdb
Nov 17 '05 #3
mdb
mdb <m_b_r_a_y@c_t_ i_u_s_a__d0t__c om> wrote in
news:Xn******** *************** *****@207.46.24 8.16:
When I view my running processes with SysInternals Process Explorer,
most of the processes have actual names (called "Descriptio n" in Process
Explorer) and Company Names set for the process. Mine (a .NET windows
service) does not. Anyone know how I can set this value?


Hmmm after a bit of checking, I think that these two properties are built
into the .EXE file itself. (Right-click EXE, Properties...) Then under the
Version tab, there are several properties listed. Both 'Product Name' and
'Company' are blank. I would like to provide values for these, but I have no
idea if VS.NET build can do that... Anyone?

--
-mdb
Nov 17 '05 #4
mdb
mdb <m_b_r_a_y@c_t_ i_u_s_a__d0t__c om> wrote in
news:Xn******** *************** *****@207.46.24 8.16:
Hmmm after a bit of checking, I think that these two properties are
built into the .EXE file itself. (Right-click EXE, Properties...) Then
under the Version tab, there are several properties listed. Both
'Product Name' and 'Company' are blank. I would like to provide values
for these, but I have no idea if VS.NET build can do that... Anyone?


OK I feel stupid. Its in the AssemblyInfo. 8-|

--
-mdb
Nov 17 '05 #5

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

Similar topics

2
2615
by: TJ | last post by:
Making a good old fashioned asp page and need to be able to display the IIS COM+ process id's (i.e. those that show up when attaching to a process in InterDev (in the debug/processes dialog box)). Is there a way to get these process id's show up in an asp page? You can tell I'm not to saavy when it comes to working my way around the...
0
2785
by: microsoft | last post by:
Hi People, when I try to modify an active directory user programatically, I receive the following exception: The server is unwilling to process the request Reading the microsoft web site, I found this article: http://support.microsoft.com/default.aspx?scid=kb;EN-US;248717 that says the following: ..........................
1
2741
by: Mullin Yu | last post by:
But, I want is that I can have a Main app that will start a new process or kill one particular or all process. The process will open a console exe. But, I don't want the user to close the console windows by themselves, and force them to use the Main app. If I use Windows Services, I'm not sure can I create one dynamically, and then kill...
2
11239
by: sidd | last post by:
hiAll, is there a way in .net/c# to check if a file is in use with another process. so i am trying to do a File.Move(source,destination)..and if the file is in use, this would through an error..System.IO.IOException.. so before i try to move the file i some how want to check if the file
1
3318
by: BenS | last post by:
Good Morning and Happy Wednesday! I've got a web service that exposes a method that takes an string input parameter that specifies an executable on the server that starts a process. These processes should runs in a Windows window. The process loads and runs under the ASPNET user account fine but the window is hidden. The Windows task...
11
3729
by: Nurit N | last post by:
This is the third newsgroup that I'm posting my problem. I'm sorry for the multiple posts but the matter becoming urgent. I hope this is the right place for it... I have created a very simple batch file (echo hello world) and was trying to retrieve the standard output but every time I run the code it returns ExitCode as 1.
4
4846
by: =?Utf-8?B?UmljaA==?= | last post by:
On a form - I have a datagridview which is docked to the entire form. The datagridview allows users to Delete and/or Add Rows. On the Form_Load event I Fill the datagridview source table with a sql DataAdapter (da) da.SelectCommand.CommandText = "Select * from Servertbl1" da.Fill(ds, "tbl1") so far, so good. If I add a row to the...
4
3225
by: Brian Gideon | last post by:
I'm having a problem with the amount of time it takes to initialize an application pool on IIS 6.0. Upon the first request to an ASP.NET page the worker process (w3wp.exe) starts up. The problem in my case is that it takes more than 5 minutes to begin servicing requests after the initial startup. During that agonizingly long period the...
8
11021
by: g3rmanpride21 | last post by:
I'm currently working with this piece of code: CheckedListBox1.Items.Clear() CheckedListBox1.DisplayMember = "ProcessName" Dim p As Process For Each p In Process.GetProcesses CheckedListBox1.Items.Add(p) Next
0
7695
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...
0
7612
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...
0
8119
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...
1
7668
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7964
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5509
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3637
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2111
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
0
936
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...

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.