#process-information #windows #task

tasklist

Get the tasklist and process information on windows

2 releases

0.3.1 Jun 1, 2025
0.3.0 May 5, 2025
0.2.15 Jul 18, 2024
0.2.13 Oct 12, 2023
0.1.9 Jun 30, 2022

#91 in Windows APIs

Download history 35/week @ 2026-01-22 30/week @ 2026-01-29 19/week @ 2026-02-05 13/week @ 2026-02-12 9/week @ 2026-02-19 48/week @ 2026-02-26 8/week @ 2026-03-05 13/week @ 2026-03-12 18/week @ 2026-03-19 14/week @ 2026-03-26 9/week @ 2026-04-02 8/week @ 2026-04-09 25/week @ 2026-04-16 56/week @ 2026-04-23 57/week @ 2026-04-30 37/week @ 2026-05-07

176 downloads per month
Used in swaptop

MIT license

325KB
1.5K SLoC

tasklist

tasklist-rs

a small crate let you can easily get tasklist and process information on windows

what information you can get

  1. Process name,pid,parrentID,threadsID.
  2. Process start_time,exit_time,and CPU_time(including kernel time and user time).
  3. Process path and commandline params.
  4. Process SID and Domain/User.
  5. Process IO infomation , including all of IO_COUNTERS member.
  6. Process memory information , including all of PROCESS_MEMORY_COUNTERS member.
  7. Process handles information , use GetProcessHandleCount Api.
  8. Process file infomation , use GetFileVersionInfoExW Api.
  9. Check whether the process is running in the WOW64 environment and get architecture info (x86/x64/ARM etc.)
  10. Iterate over all processes.
  11. Process termination functionality.

remember some infomation need higher privilege in some specific windows versions

example

Get all process pid , process name and user .

use tasklist;

fn main(){
   
    let tl = tasklist::Tasklist::new().unwrap();
    tasklist::enable_debug_priv();
    for i in tl{
        println!("{} {} {}",i.get_pid(),i.get_pname(),i.get_user());
    }
}

tasklist-rs

Get all process name , pid , company name , file description.

use tasklist;

fn main(){
    let tasks = tasklist::tasklist().unwrap();
    for i in tasks {
        match i.get_file_info(){
            Ok(info) => println!("{:?}", info.get("FileDescription")),
            Err(_) => (),
        }
    }
}

tasklist-rs

Usage

Add this to your Cargo.toml:

[dependencies]
tasklist = "0.3.1"

Dependencies

~0–28MB
~459K SLoC