home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic .NET - Read Less - Learn More / Visual_Basic.NET_Read_Less_Learn_More_Richard_Bowman_Visual_2002.iso / Resources / Code / Ch11-InstallWindowsService / ServiceInstall.vb < prev   
Text File  |  2001-09-02  |  571b  |  21 lines

  1. Imports System.ServiceProcess
  2. Imports System.Configuration.Install
  3. Imports System.ComponentModel
  4.  
  5. <RunInstaller(True)> _
  6. Public Class ServiceInstall
  7.     Inherits Installer
  8.  
  9.     Private servInstall As New ServiceInstaller()
  10.     Private procInstall As New ServiceProcessInstaller()
  11.  
  12.     Sub New()
  13.         procInstall.Account = ServiceAccount.LocalSystem
  14.         servInstall.ServiceName = "Service1"
  15.         servInstall.StartType = ServiceStartMode.Automatic
  16.  
  17.         Installers.Add(procInstall)
  18.         Installers.Add(servInstall)
  19.     End Sub
  20. End Class
  21.