Guest User

Untitled

a guest
Jun 24th, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. ServiceInstaller si = new ServiceInstaller();
  2. si.ServiceName = "MyService";
  3.  
  4. ServiceProcessInstaller spi = new ServiceProcessInstaller();
  5. spi.Account = ServiceAccount.LocalSystem;
  6.  
  7. spi.Installers.Add(si);
  8.  
  9. this.Installers.Add(spi);
  10.  
  11. TransactedInstaller ti = new TransactedInstaller();
  12.  
  13. ServiceInstaller si = new ServiceInstaller();
  14. si.ServiceName = "MyService";
  15. ti.Installers.Add(si);
  16.  
  17. ServiceProcessInstaller spi = new ServiceProcessInstaller();
  18. spi.Account = ServiceAccount.LocalSystem;
  19. ti.Installers.Add(spi);
  20.  
  21. this.Installers.Add(ti);
Add Comment
Please, Sign In to add comment