当前位置:网站首页>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语言程序
- Relevant database questions.
- Linu foundation - zoning planning and use
- 免实名域名是什么意思?
- Go installation and configuration (1)
- Resolved: initialize specified but the data directory has files in it Aborting
- IDEA import导入的类明明存在,却飘红?
- Egret engine P2 physics engine (2) - Funny physical phenomenon of small balls hitting the ground
- Win10 step pit - power on 0xc0000225
- If I am in Zhuhai, where can I open an account? In addition, is it safe to open a mobile account?
猜你喜欢
Out of class implementation of member function of class template
Resolution: div failed to get keyboard event
B站首个UP主付费观看视频还是来了!价格“劝退”网友
SOC project AHB_ SD_ Host controller design
【docsify基本使用】
【我的OpenGL学习进阶之旅】关于OpenGL的着色器的向量和矩阵分类的访问方式: xyzw/rgba/stpq以及数组下标
解决:div获取不到键盘事件
SOC_ AHB_ SD_ IF
[transfer] analysis of memory structure, cache and DMA architecture
SOC_ SD_ CLK
随机推荐
神经网络计算量及参数量
Egret P2 pit encountered by physical engine (1)
Go项目目录结构介绍
Class templates and friends
What underlying technologies support the metauniverse?
Write about your feelings about love and express your emotions
Linux服务器安装Redis
[semidrive source code analysis] [x9 chip startup process] 33 - Analysis of related concepts of display module
Goland常用快捷键设置
QT signal slot alarm QObject:: connect:cannot connect (null)
app闪退
成品升级程序
Four great happenings on earth
B站首个UP主付费观看视频还是来了!价格“劝退”网友
How does the CPU recognize the code?
Resolved: initialize specified but the data directory has files in it Aborting
我今年毕业,但我不知道我要做什么
【已实现】服务器jar包启动脚本、shell脚本
Ftplib+ tqdm upload and download progress bar
对占用多字节和位的报文信号解析详解