示例#1
0
        public string IsUnInstalDispatchHander(out string statusCode, out string errMsg)
        {
            statusCode = "0000";
            errMsg     = "";

            if (!ServiceToolEx.IsServiceExist(dispatchServerName))
            {
                errMsg     = dispatchServerName + "服务不存在";
                statusCode = "4100";
                return("");
            }
            if (!ServiceToolEx.UninstallService(dispatchServerName))
            {
                errMsg     = dispatchServerName + "服务卸载失败!" + ErrorPolicy;
                statusCode = "4101";
                return("");
            }
            return(dispatchServerName + "服务卸载成功");
        }
示例#2
0
        // 卸载服务--核心服务和调度服务
        public string IsUnInstalCoreHander(out string statusCode, out string errMsg)
        {
            statusCode = "0000";
            errMsg     = "";

            if (!ServiceToolEx.IsServiceExist(serverName))
            {
                errMsg     = serverName + "服务不存在";
                statusCode = "4000";
                return("");
            }
            if (!ServiceToolEx.UninstallService(serverName))
            {
                errMsg     = serverName + "服务卸载失败!" + ErrorPolicy;
                statusCode = "4001";
                return("");
            }
            string dispatchInfo = IsUnInstalDispatchHander(out statusCode, out errMsg);

            return(serverName + "服务卸载成功;" + dispatchInfo);
        }