zoukankan      html  css  js  c++  java
  • C# Windows服务相关

    代码及注释

                ServiceController sc = new ServiceController("gupdatem");
                sc.Stop();//停止服务
                sc.Start();//开始
                sc.Status.ToString();//运行状态;
                
                
                RegistryKey rk =Registry.LocalMachine.OpenSubKey(@"SYSTEMCurrentControlSetServices360AntiHacker");
                if (rk!=null)
                {
                    rk.GetValue("imagePath").ToString();//取服务路径
                    rk.GetValue("Start").ToString();//服务运行方式  1,2,3,4  没有方式 自动 手动 禁用
                }
  • 相关阅读:
    MQ
    redis
    MongoDB
    进程相关命令
    catalina.sh
    tomcat-jvm
    中间件简介
    websphere
    mysql
    shell变量与字符串操作
  • 原文地址:https://www.cnblogs.com/SoftWareIe/p/8875041.html
Copyright © 2011-2022 走看看