⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 srvinstaller.cs

📁 vb 做的文件下载程序
💻 CS
字号:
namespace srvDownload
{
    using System;
    using System.Collections;
    using System.Core;
    using System.ComponentModel;
    using System.Configuration.Install;
	using System.ServiceProcess;


    /// <summary>
    ///     Summary description for srvInstaller.
    /// </summary>
    [RunInstaller(true)]
    public class srvInstaller : System.Configuration.Install.Installer
    {
        /// <summary>
        ///    Required designer variable.
        /// </summary>
        private System.ServiceProcess.ServiceProcessInstaller srvProcessInstall;
		private System.ServiceProcess.ServiceInstaller srvInstall;


        public srvInstaller()
        {
            // This call is required by the Designer.
            InitializeComponent();
			srvInstall=new System.ServiceProcess.ServiceInstaller();
			srvProcessInstall=new System.ServiceProcess.ServiceProcessInstaller();
		
            // TODO: Add any initialization after the InitComponent call
			//create service installer
				srvInstall.StartType=System.ServiceProcess.ServiceStart.Automatic;
				srvInstall.ServiceName=  "srvDownload";
				srvInstall.DisplayName="DownloadUtility";
				Installers.Add(srvInstall);
				
				//create process installer
			   srvProcessInstall.RunUnderSystemAccount=true;
			   Installers.Add(srvProcessInstall);

        }

        /// <summary>
        ///    Required method for Designer support - do not modify
        ///    the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
				

        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -