Programming Tutorials

Using the ServiceInstaller Class in VB.net

By: Steven Holzner in VB.net Tutorials on 2010-10-23  

ServiceInstaller objects install Windows services. Here is the inheritance hierarchy of this class:

Object
   MarshalByRefObject
      Component
         Installer
            ComponentInstaller
               ServiceInstaller

You can find the more notable public properties of objects of the Service Installer class in Table 10, their more notable methods in Table 11, and their more notable events in Table 12. Note that I'm including the properties, methods, and events inherited from the Installer and ComponentInstaller classes in these tables.

Table 10: Noteworthy public properties of ServiceInstaller objects.

Property

Means

DisplayName

Holds the display name of the service.

HelpText

Gets the help text for the installers.

Installers

Gets the installers themselves.

Parent

Gets/sets the parent installer.

ServiceName

Holds the name used to identify this service.

ServicesDependedOn

Specifies the services that must be running to support this service.

StartType

Specifies when this service is started.

Table 11: Noteworthy public methods of ServiceInstaller objects.

Method

Means

Commit

When overridden, commits the install operation.

Install

Installs the service by writing service data to the registry.

Rollback

Rolls back data written to the registry.

Uninstall

Uninstalls the service.

Table 12: Noteworthy public events of ServiceInstaller objects.

Event

Means

AfterInstall

Occurs after the installers have run.

AfterRollback

Occurs after the installations are rolled back.

AfterUninstall

Occurs after all the installers finish their uninstallation operations.

BeforeInstall

Occurs before the each installer's Install method runs.

BeforeRollback

Occurs before the installers are rolled back.

BeforeUninstall

Occurs before the installers execute uninstall operations.

Committed

Occurs after all the installers commit installations.

Committing

Occurs before the installers commit installations






Add Comment

* Required information
1000

Comments

No comments yet. Be the first!

Most Viewed Articles (in VB.net )

Latest Articles (in VB.net)