当前位置:网站首页>QT wmic command obtains some hardware information
QT wmic command obtains some hardware information
2022-06-30 07:09:00 【HL_ Aeolus】
WMIC A large number of commonly used commands can be queried by Baidu
/* * obtain cpu name : wmic cpu get Name * obtain cpu The core number : wmic cpu get NumberOfCores * obtain cpu Number of threads : wmic cpu get NumberOfLogicalProcessors * obtain cpu Serial number : wmic cpu get processorid * Query the serial number of the motherboard : wmic baseboard get serialnunber * Inquire about bios Serial number : wmic bios get serialnunber * Check out the hard disk : wmic diskdrive get serialnunber */
QString getWMIC(const QString &cmd)
{
QProcess p;
p.start(cmd);
p.waitForFinished();
QString result = QString::fromLocal8Bit(p.readAllStandardOutput());
QStringList list = cmd.split(" ");
result = result.remove(list.last(),Qt::CaseInsensitive);
result = result.simplified();
return result;
}
边栏推荐
- Go常用命令
- 对占用多字节和位的报文信号解析详解
- How to set the hot deployment of idea web project
- Starting MySQL ERROR! Couldn‘t find MySQL server (/usr/local/mysql/bin/mysqld_safe)
- Go语言指针介绍
- ROS service communication programming
- Basic fragmentary thoughts
- 2021-07-02
- Essence of signal slot macros signal and slot
- [datawhale team learning] task02: mathematical operation, string and text, list
猜你喜欢

QT generate random number qrandomgenerator

Traverse map

Go项目目录结构介绍

Skillfully use 5 keys to improve office efficiency

Egret P2 physical engine (1) small ball falling demo

Google Earth engine (GEE) - Murray global tidal wetland change V1 (1999-2019) data set

Win10 step pit - power on 0xc0000225

Pit stepping record: Supervisor log return information: redis extension is not installed

28 rounds of interviews with 10 companies in two and a half years

QT common macro definitions
随机推荐
[datawhale team learning] task02: mathematical operation, string and text, list
Introduction to go language pointer
【docsify基本使用】
Linu基础-分区规划与使用
大学刚毕业不知道做什么工作怎么办?
【json-tutorial】第一章学习笔记
经纬恒润再次荣获PACCAR集团 10PPM 质量奖
Running lantern effect JS text rotation effect realization
Solr search
已解决:initialize specified but the data directory has files in it. Aborting
Go项目目录结构介绍
Determine whether the picture is in JPG picture format
What underlying technologies support the metauniverse?
[daily question] 535 Encryption and decryption of tinyurl
【最全】linux服务器上安装Mysql
免实名域名是什么意思?
Mysql5.7 compressed version installation tutorial
第一行代码(第三版)学习笔记
踩坑记录:supervisor 日志返回信息:redis扩展未安装
[docsify basic use]