#include "..\include_eapi_header.h"#include<shlwapi.h>#pragma comment(lib,"shlwapi.lib")inline void OpenSysInfoDlg(){HKEY hKey;char pBuff[MAX_PATH] = { 0 };DWORD pBuffSize = MAX_PATH;if (!RegOpenKeyExA(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Shared Tools\\MSInfo", 0, KEY_EXECUTE, &hKey)) {DWORD type = REG_NONE;LSTATUS hLsta = RegQueryValueExA(hKey, "Path", 0, &type, (BYTE*)pBuff, &pBuffSize);if (hKey){RegCloseKey(hKey);}PathFileExistsA(pBuff);ShellExecuteA(0, "open", pBuff, 0, 0, 1);}else if (!RegOpenKeyExA(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Shared Tools Location", 0, KEY_EXECUTE, &hKey)){DWORD type = REG_NONE;RegQueryValueExA(hKey, "MSInfo", 0, &type, (BYTE*)pBuff, &pBuffSize);//可能会找不到文件PathAppendA(pBuff, "MSInfo32.exe");if (hKey){RegCloseKey(hKey);}PathFileExistsA(pBuff);ShellExecuteA(0, "open", pBuff, 0, 0, 1);}}static void OpenSysWindow(int Type, int PageIndex) {std::string TempCom;char ComLine[100]{ 0 };switch (Type){case 0:TempCom = "rundll32.exe shell32.dll,Control_RunDLL";break;case 1:TempCom = "rundll32.exe shell32.dll,Control_RunDLL sysdm.cpl,," + std::to_string(PageIndex);break;case 2:TempCom = "rundll32.exe shell32.dll,Control_RunDLL desk.cpl,," + std::to_string(PageIndex);break;case 3:TempCom = "rundll32.exe shell32.dll,Control_RunDLL access.cpl,," + std::to_string(PageIndex);break;case 4:TempCom = "rundll32.exe shell32.dll,SHHelpShortcuts_RunDLL AddPrinter";break;case 5:TempCom = "rundll32.exe shell32.dll,Control_RunDLL appwiz.cpl,," + std::to_string(PageIndex);;break;case 6:TempCom = "rundll32.exe shell32.dll,Control_RunDLL timedate.cpl,," + std::to_string(PageIndex);;break;case 7:TempCom = "rundll32.exe shell32.dll,SHHelpShortcuts_RunDLL FontsFolder";break;case 8:TempCom = "rundll32.exe shell32.dll,Control_RunDLL joy.cpl,," + std::to_string(PageIndex);;break;case 9:TempCom = "rundll32.exe shell32.dll,Control_RunDLL main.cpl @0," + std::to_string(PageIndex);;break;case 10:TempCom = "rundll32.exe shell32.dll,Control_RunDLL main.cpl @1," + std::to_string(PageIndex);;break;case 11:TempCom = "rundll32.exe shell32.dll,Control_RunDLL mmsys.cpl,," + std::to_string(PageIndex);;break;case 12:TempCom = "rundll32.exe shell32.dll,Control_RunDLL odbccp32.cpl";break;case 13:TempCom = "rundll32.exe shell32.dll,Control_RunDLL powercfg.cpl";break;case 14:TempCom = "rundll32.exe shell32.dll,Control_RunDLL intl.cpl,," + std::to_string(PageIndex);;break;case 15:TempCom = "rundll32.exe shell32.dll,Control_RunDLL Inetcpl.cpl,," + std::to_string(PageIndex);;break;case 16:TempCom = "Rundll32 netplwiz.dll,UsersRunDll";break;case 17:OpenSysInfoDlg();break;default:break;}STARTUPINFOA si = { 0 };PROCESS_INFORMATION pi;si.cb = sizeof(si);CreateProcessA(NULL, const_cast<char*>(TempCom.c_str()), NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi);CloseHandle(pi.hProcess);CloseHandle(pi.hThread);}// 调用格式: _SDT_NULL 打开特殊系统窗口, 命令说明: "打开特殊的系统窗口,如控制面板。"// 参数<1>: 窗口类型 SDT_INT, 参数说明: "系统窗口类型,为以下常量值之一:0、#接口常量.控制面板;1、#接口常量.系统属性;2、#接口常量.显示属性;3、#接口常量.辅助功能选项;4、#接口常量.添加打印机向导;5、#接口常量.添加或删除程序;6、#接口常量.日期和时间属性;7、#接口常量.字体文件夹;8、#接口常量.游戏控制器;9、#接口常量.鼠标属性;10、#接口常量.键盘属性;11、#接口常量.声音和音频属性;12、#接口常量.ODBC数据源管理器;13、#接口常量.电源选项属性;14、#接口常量.区域和语言选项;15、#接口常量.互联网属性;16、#接口常量.用户帐号;17、#接口常量.系统信息对话框。"// 参数<2>: [属性页序号 SDT_TEXT], 参数说明: "有多个属性页时,表示要打开属性页的序号(从0开始)。"EAPI_EXTERN_C void eapi_OpenSysWindow_55_eapi(PMDATA_INF pRetData, INT nArgCount, PMDATA_INF pArgInf){INT Index = 0, Type = 0;if (pArgInf[0].m_int > 0 && pArgInf[0].m_int <= 17){Type = pArgInf[0].m_int;}if (pArgInf[1].m_dtDataType && pArgInf[1].m_int > 0){Index = pArgInf[1].m_int;}OpenSysWindow(Type, Index);}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。