By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,903 Members | 1,670 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,903 IT Pros & Developers. It's quick & easy.

Start windows service in installer class

P: n/a

in my Windows service installer i want to start it in AfterInstall

i don't have success to do it, and i don't find any topics who have the

Can someone help me ?

#Region "Class installer"

<RunInstallerAttribute(True)> _
Public Class MyProjectInstaller
Inherits Installer
Private monServiceInstaller As ServiceInstaller
Private components As System.ComponentModel.IContainer
Private monProcessInstaller As ServiceProcessInstaller

Public Sub New()
monProcessInstaller = New ServiceProcessInstaller
monServiceInstaller = New ServiceInstaller

monProcessInstaller.Account = ServiceAccount.LocalSystem
monServiceInstaller.StartType = ServiceStartMode.Automatic
monServiceInstaller.ServiceName = "myServiceName"
monServiceInstaller.DisplayName = "myServiceName"
End Sub
Private Sub MyProjectInstaller_AfterInstall(ByVal sender As Object,
ByVal e As System.Configuration.Install.InstallEventArgs) Handles
==========>>>>>>>>>I WANT TO START IT HERE
End Sub
End Class
#End Region

Nov 21 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.