ServiceInstaller.cs 845 B

12345678910111213141516171819202122232425262728293031323334353637
  1. using System;
  2. using System.Collections;
  3. using System.Collections.Generic;
  4. using System.ComponentModel;
  5. using System.Linq;
  6. using System.ServiceProcess;
  7. using System.Text;
  8. using System.Configuration;
  9. namespace CassiniDev
  10. {
  11. [RunInstaller(true)]
  12. public sealed class MyServiceInstallerProcess : ServiceProcessInstaller
  13. {
  14. public MyServiceInstallerProcess()
  15. {
  16. this.Account = ServiceAccount.NetworkService;
  17. }
  18. }
  19. [RunInstaller(true)]
  20. public sealed class MyServiceInstaller : ServiceInstaller
  21. {
  22. public MyServiceInstaller()
  23. {
  24. this.Description = "CassiniDev";
  25. this.DisplayName = "CassiniDev";
  26. this.ServiceName = "CassiniDev";
  27. this.StartType = System.ServiceProcess.ServiceStartMode.Automatic;
  28. }
  29. }
  30. }