python - 输出 exe 使用的所有 DLL 的脚本
问题描述
在 cmd 行
tasklist /m /fi "imagename eq xxxxx.exe" > output.txt
将所有进程使用的 DLL 输出到一个文件。
如何将输出分隔为多个 txt 文件,每个文件都包含 DLL 使用的进程的名称?
解决方案
这应该可以得到你想要的:
Get-Process |
ForEach-Object {
$procName = $_.Name
Get-Process -InputObject $_ -Module -ErrorAction SilentlyContinue |
Export-Csv ".\$procName.csv" -NoTypeInformation
}
推荐阅读
- docker - Kafka 容器在一段时间后停止,客户端会话超时
- php - 在 laravel 中连接 php
- docker - 使用 rules_docker 的 container_image 规则创建的镜像中文件的时间戳都设置为零
- angular - 当我在 amcharts 中选择一个部分时,如何获得准确的范围值?
- benchmarkdotnet - 使用 BenchmarkDotNet 在基准之间保留数据
- c - 我需要创建一个十进制到二进制程序,它可以接收多达 100,000,000 的输入并输出整个答案而不显示垃圾
- go - Go 命令获取关键字或保留字列表?
- google-bigquery - BigQuery 删除重复项保持最后
- java - 在 Spring Boot 中查询自动生成的表
- sql - PostgreSQL 自定义 CHECK 列