使用 C# 设置进程“图像名称"和“描述" [英] Set Process 'image name' and 'description' wtih C#

查看:61
本文介绍了使用 C# 设置进程“图像名称"和“描述"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想尽可能详细地说明这个问题,以便容易理解并且可以回答

I want to go into as much detail as possible so this question is easily understood and answer-able

本质上,我需要一种在应用程序启动上使用 C# 设置进程名称进程描述的方法.

Essentially I need a way set up the process name and process description with C# on the applications startup.

这是我想要更改的示例;

Here is an example of what I would like changing;

注意:我想用 CODE 设置我自己的 C# 应用程序图像和描述.

Note: I want to set my OWN C# applications image and description with CODE.

我希望能够在启动时更改我的应用程序中的以下内容.Image Name 在进程列表中,以及在进程列表中的 Description.到目前为止,在我的 C# 应用程序中,我可以使用属性设置进程名称,但 id 可以使用某种代码片段(以及描述)设置它.

I want to be able to change the following things in my application on startup. Image Name in the Processes list, as well as the Description in the Processes list. So far in my C# application i can set the process name with the properties but id rather be able to set it with some sort of code snippet (as well as the description).

我希望这是一个信息问题,你在 stackoverflow 上的聪明人可以提供帮助.

I hope this has been a information question and you good clever people at stackoverflow can help.

推荐答案

您无法更改图像名称.它是您的可执行文件的名称.但是,可以在 C# 项目程序集信息上更改过程描述:

You can't change the image name. It's the name of your executable file. The process description, however, can be changed on your C# project assembly info:

在 Visual Studio 中右键单击您的 C# 项目 > 属性 > 应用程序 > 程序集信息 > 标题.

Right click on your C# project in Visual Studio > Properties > Application > Assembly information > Title.

您不能在运行时通过代码更改描述:操作系统在启动时从 版本信息文件资源.

You can't change the description at runtime from code: the OS loads the description at startup from the Version Information file resource.

这篇关于使用 C# 设置进程“图像名称"和“描述"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆