public Installer1()
{

InitializeComponent(); // TODO: Add any initialization after the InitComponent call
processInstaller = new ServiceProcessInstaller();
serviceInstaller = new ServiceInstaller();
 
// The services will run under the system account.
processInstaller.Account = ServiceAccount.LocalSystem;

// The services will be started manually.
serviceInstaller.StartType = ServiceStartMode.Automatic; // ServiceName must equal those on ServiceBase derived classes.            
serviceInstaller.ServiceName = "MHFTPServer";
serviceInstaller.DisplayName="MYHome个人主页基地FTP服务"; // Add installers to collection. Order is not important.
Installers.Add(serviceInstaller);
Installers.Add(processInstaller);
}