implement a Commit override in your installer class and use
ServiceController to do that.
> I'm using a Setup Project in VB.NET 2003 Standard to install a windows
> service application. I would like this installer to start the service after
> install. How do I do that?
>
> Thanks,
> Russ
Phil Wilson - 13 Nov 2003 19:44 GMT
You're right, Commit is a better place than the Install method.

Signature
Phil Wilson [MVP Windows Installer]
----
> implement a Commit override in your installer class and use
> ServiceController to do that.
[quoted text clipped - 6 lines]
> > Thanks,
> > Russ
See the MSDN Topic "Walkthrough: Creating a Windows Service Application in the
Component Designer". Maybe you already did, but that refers to a custom action
that installs your service. In the Install method (override it) use
ServiceController to start it.
(If your company happens to use a commercial tool from InstallShield, Wise etc
etc, you don't need any of the above. They create the right entries in the MSI
file, ServiceInstall and ServiceControl tables, that get the Windows Installer
to do literally all of that stuff without you needing to write code).

Signature
Phil Wilson [MVP Windows Installer]
----
> I'm using a Setup Project in VB.NET 2003 Standard to install a windows
> service application. I would like this installer to start the service after
> install. How do I do that?
>
> Thanks,
> Russ
Russ Green - 14 Nov 2003 12:53 GMT
Thanks for your answers guys. Did it with the following code in
ProjectInstaller.vb
Protected Overrides Sub OnAfterInstall(ByVal savedState As IDictionary)
MyBase.OnAfterInstall(savedState)
Try
Microsoft.VisualBasic.Shell("net start IpNotifyService")
Catch ex As Exception
End Try
End Sub 'OnAfterInstall
> See the MSDN Topic "Walkthrough: Creating a Windows Service Application in the
> Component Designer". Maybe you already did, but that refers to a custom action
[quoted text clipped - 14 lines]
> > Thanks,
> > Russ
konsu - 14 Nov 2003 17:42 GMT
Is there a reason why you decided not to use the ServiceController class?
konst
> Thanks for your answers guys. Did it with the following code in
> ProjectInstaller.vb
[quoted text clipped - 37 lines]
> > > Thanks,
> > > Russ
Phil Wilson - 14 Nov 2003 17:55 GMT
Interesting - I wonder if there's a command prompt screen popping up?

Signature
Phil Wilson [MVP Windows Installer]
----
> Is there a reason why you decided not to use the ServiceController class?
>
[quoted text clipped - 44 lines]
> > > > Thanks,
> > > > Russ
Russ Green - 22 Nov 2003 17:16 GMT
Yes, a command prompt screen does popup.
Russ
> Interesting - I wonder if there's a command prompt screen popping up?
> --
[quoted text clipped - 48 lines]
> > > > > Thanks,
> > > > > Russ
konsu - 14 Nov 2003 17:43 GMT
Is there a reason why you decided not to use the ServiceController class?
konst
> Thanks for your answers guys. Did it with the following code in
> ProjectInstaller.vb
[quoted text clipped - 37 lines]
> > > Thanks,
> > > Russ