---
title: "【batshell】tasklist & taskkill"
author: "Perrin Yong"
author_profile: https://www.pystone.net/profile/
published_by: "Perrin Yong"
canonical: https://www.pystone.net/notes/windows-tasklist-taskkill/
type: note
content_role: unspecified
visibility: public
id_stability: rename-stable
source_path: "10-计算机、信息技术与工程/03-软件工程与质量保障/CI-CD与质量保障/CI-CD工具链/【batshell】tasklist & taskkill.md"
content_hash: a66ddbc3481429547568d8ff1b819b63c15ca84173f5c185dcee1c8a4a42805e
knowledge_version: 224c990773de.5fa8af6e39fa
site_commit: 224c990773de166d23a886306577dd90379529ce
notes_commit: 5fa8af6e39fa3891d1b9b4832bfa6c4e0ecaaf0a
---
# 【batshell】tasklist & taskkill

﻿# 【bat/shell】tasklist & taskkill

> 创建时间：2021/9/24 18:20

* 进程查找与杀死
    * tasklist
    * taskkill
    * 完整代码
  * 相关知识点
  * 查询程序及命令行参数
  * Ref

## 进程查找与杀死

### tasklist

  * **Image name** is the name of the executable, e.g. explorer.exe or myapp.exe

```csharp
string a = &quot;test&quot;;
string tmp = &quot;est&quot;;
string b = &quot;t&quot; + tmp;
Console.WriteLine(string .ReferenceEquals(str1, str2));

```
```csharp
string a = &quot;test&quot;;
string tmp = &quot;est&quot;;
string b = &quot;t&quot; + tmp;
Console.WriteLine(string .ReferenceEquals(str1, str2));

```
```csharp
string a = &quot;test&quot;;
string tmp = &quot;est&quot;;
string b = &quot;t&quot; + tmp;
Console.WriteLine(string .ReferenceEquals(str1, str2));

```

### taskkill

```csharp
string a = &quot;test&quot;;
string tmp = &quot;est&quot;;
string b = &quot;t&quot; + tmp;
Console.WriteLine(string .ReferenceEquals(str1, str2));

```
```csharp
string a = &quot;test&quot;;
string tmp = &quot;est&quot;;
string b = &quot;t&quot; + tmp;
Console.WriteLine(string .ReferenceEquals(str1, str2));

```

### 完整代码

```csharp
string a = &quot;test&quot;;
string tmp = &quot;est&quot;;
string b = &quot;t&quot; + tmp;
Console.WriteLine(string .ReferenceEquals(str1, str2));

```

## 相关知识点

1>nul 意思是不显示命令运行的正确提示
2>nul 是不显示错误提示
一起就是 正确错误的都不显示

> 是重定向符号
>  nul是空设备的意思
>  把提示输入到空设备就不显示了

## 查询程序及命令行参数

```csharp
string a = &quot;test&quot;;
string tmp = &quot;est&quot;;
string b = &quot;t&quot; + tmp;
Console.WriteLine(string .ReferenceEquals(str1, str2));

```
```csharp
string a = &quot;test&quot;;
string tmp = &quot;est&quot;;
string b = &quot;t&quot; + tmp;
Console.WriteLine(string .ReferenceEquals(str1, str2));

```

## Ref

https://blog.csdn.net/c1520006273/article/details/50539092
