Esempio n. 1
0
 static void UnInstall()
 {
     string.Format("卸载服务:{0}:{1}", _SrcConfig.ServiceInfo.DisplayName,
                   _SrcConfig.ServiceInfo.ServiceName).Info();
     try
     {
         BasicServiceInstaller.Uninstall(_SrcConfig.ServiceInfo.DisplayName,
                                         _SrcConfig.ServiceInfo.ServiceName,
                                         _SrcConfig.ServiceInfo.Description);
     }
     catch (Exception eX)
     {
         eX.Exception();
     }
 }
Esempio n. 2
0
        static void Install()
        {
            string.Format("安装服务:{0}:{1}", _SrcConfig.ServiceInfo.DisplayName,
                          _SrcConfig.ServiceInfo.ServiceName).Info();

            try
            {
                BasicServiceInstaller.Install(_SrcConfig.ServiceInfo.DisplayName,
                                              _SrcConfig.ServiceInfo.ServiceName,
                                              _SrcConfig.ServiceInfo.Description,
                                              _SrcConfig.ServiceInfo.DependedOn,
                                              _ConfigFile);
            }
            catch (Exception eX)
            {
                eX.Exception();
            }
        }