admin 管理员组

文章数量: 1086019


2023年12月17日发(作者:autojs入门教学)

proUserName = GetProcessUserName(); ("" + proUserName + ""); program = ng(); ("" + program + ""); path = ng(); ("" + path + ""); } catch (Exception ex) { } finally { (""); } #endregion }

} ("" + ng() + "");

("" + ng() + ""); return ng(); } 获取所有服务 #region 所有服务 string serviceInfor = GetAllServiceInfor(); #endregion

///

/// 获取服务信息 /// /// private string GetAllServiceInfor() { StringBuilder infor = new StringBuilder(); string serviceName = ""; string path = ""; string description = ""; ServiceController[] services = vices(); long serverID = 1; foreach (var ser in services) { (""); serviceName = yName; if (ns("&")) { serviceName = e("&", "<"); } ("" + serviceName + ""); path = ServerFilePathAndDescription(eName, out description); ("" + path + ""); ("" + description + ""); (""); //infor = infor + serviceName + "," + path + "," + description + "&"; serverID++; } return ng(); } /// /// 通过服务名称获取服务路径和服务描述 /// /// 服务名称 /// 服务描述 /// public string ServerFilePathAndDescription(string serviceName, out string description) { description = ""; RegistryKey _Key = bKey(@"SYSTEMControlSet001Services" + serviceName); if (_Key != null) { object _ObjDescription = _ue("Description"); if (_ObjDescription != null) description = _ng(); object _ObjPath = _ue("ImagePath"); if (_ObjPath != null) return _ng(); } return ""; } 硬盘序列号 /// /// 获取硬盘ID


本文标签: 服务 获取 教学