重新启动资源管理器.exe使用 C++
Restarting explorer.exe using C++
我已经看过这篇文章:如何通过C++启动资源管理器.exe这是一个旧帖子。我正在使用批处理文件命令,我想使用C++复制此功能
taskkill /f /im explorer.exe
start explorer.exe
我正在使用
系统(" ")
命令C++实现它。这是代码:请注意,杀死资源管理器.exe正在工作,但我无法再次启动它。
#include "pch.h"
#include <windows.h>
#include <iostream>
int main ()
{
system("taskkill /f /im explorer.exe");
system("explorer.exe");
}
它不是打开资源管理器.exe以恢复窗口 UI,而是在窗口中打开快速访问。知道吗?
使用 cmd 将是%SystemRoot%Explorer.exe
,并且在 c ++ 中使用如果是system("C:/Windows/Explorer.exe")
您的代码将打开以下文件C:/windows/sistem32/explorer
什么是用户界面,您必须在此路径上打开用户界面C:/windows/Explorer.exe
我希望它对你有用,运气。
例
#include "pch.h"
#include <windows.h>
#include <iostream>
int main ()
{
system("taskkill /f /im explorer.exe");
system("C:/windows/Explorer.exe");
}```
相关文章:
- 如何创建一个CMake变量,除非显式重写,否则使用默认值
- C++:TypeDef使用元组
- 使用std::multimap迭代器创建std::list
- 从不同线程使用int64的不同字节安全吗
- 比较并显示使用最小值(a,b)和最大值(a、b)升序排列的4个数字
- 为什么在全局范围内使用"extern int a"似乎不行?
- 在C#中处理C++指针而不使用unsafe的最佳方法
- 使用C++库在Android项目中修改gradle中的cmake参数,用于插入指令的测试
- 如何使用Google Mock来模拟gettimeofday()
- 如何使用默认参数等选择模板专业化
- 为什么使用 "this" 指针调用派生成员函数?
- 使用新行和不使用新行读取文件
- 如何使用 < 和 > 命令获取 c++ 中的输入和输出?
- 如何确定我已使用非编码文件到达 EOF?
- 如何在cuSparse中使用cusparseXcoo2csr从coo转换为csc
- 使用CMake创建QML插件
- 使用strcpy将char数组的元素复制到另一个数组
- 在c++中使用nlohmann从类到json的转换
- 使用指针从C++中的数组中获取最大值
- 使用不带参数的函数访问结构元素