Msdn installutil
If RunInstallerAttribute is false or does not exist, the install utility ignores the project installer. The ServiceProcessInstaller associated with your project installation class installs information common to all ServiceInstaller instances in the project.
If this service has anything that separates it from the other services in the installation project, that service-specific information is installed by this method. It is crucial that the ServiceName be identical to the ServiceBase. ServiceName of the class you derived from ServiceBase.
Normally, the value of the ServiceBase. ServiceName property for the service is set within the Main function of the service application's executable. ServiceName property to locate the service within this executable. You can modify other properties on the ServiceInstaller either before or after adding it to the Installers collection of your project installer.
For example, a service's StartType may be set to start the service automatically at reboot or require a user to start the service manually. Normally, you will not call the methods on ServiceInstaller within your code; they are generally called only by the install utility. The install utility automatically calls the ServiceProcessInstaller. Install and ServiceInstaller. Install methods during the installation process. It backs out failures, if necessary, by calling Rollback or ServiceInstaller.
Rollback on all previously installed components. The installation utility calls Uninstall to remove the object. An application's install routine maintains information automatically about the components already installed, using the project installer's Installer.
This state information is continuously updated as the ServiceProcessInstaller instance, and each ServiceInstaller instance is installed by the utility. It is usually unnecessary for your code to modify state information explicitly. When the installation is performed, it automatically creates an EventLogInstaller to install the event log source associated with the ServiceBase derived class.
The Log property for this source is set by the ServiceInstaller constructor to the computer's Application log. ServiceName of the service , the Source is automatically set to the same value. In an installation failure, the source's installation is rolled-back along with previously installed services. The Uninstall method tries to stop the service if it is running.
Whether this succeeds or not, Uninstall undoes the changes made by Install. If a new source was created for event logging, the source is deleted. Initializes a new instance of the ServiceInstaller class. Gets the IContainer that contains the Component. Gets or sets a value that indicates whether the service should be delayed from starting until other automatically started services are running.
Gets a value that indicates whether the Component is currently in design mode. Gets the list of event handlers that are attached to this Component. Indicates the name used by the system to identify this service. This property must be identical to the ServiceName of the service you want to install. Gets or sets the ISite of the Component. Copies properties from an instance of ServiceBase to this installer.
Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. Releases all resources used by the Component. Releases the unmanaged resources used by the Component and optionally releases the managed resources. Retrieves the current lifetime service object that controls the lifetime policy for this instance. Returns an object that represents a service provided by the Component or by its Container. Gets the Type of the current instance.
Installs the service by writing service application information to the registry. This method is meant to be used by installation tools, which process the appropriate methods automatically. Creates a shallow copy of the current Object. Creates a shallow copy of the current MarshalByRefObject object.
The following command writes the installation progress for myAssembly. InstallLog and writes the progress for myTestAssembly. Skip to main content. This browser is no longer supported. Download Microsoft Edge More info. Contents Exit focus mode. Is this page helpful? Please rate your experience Yes No. Any additional feedback? Note Help text on the options supported by individual installer components is returned by the Installer.
Important In some cases, parameters passed to the installer may include sensitive or personally identifiable information, which, by default, is written to a plain text log file. Submit and view feedback for This product This page. View all page feedback. In this article. The file name of the assembly in which to execute the installer components. Displays additional options recognized by individual installers within the specified assembly, along with command syntax and options for InstallUtil.
This option adds the text returned by each installer component's Installer. HelpText property to the help text of InstallUtil. For example, if ServiceProcessInstaller. Specifies the strong name of an assembly, which must be registered in the global assembly cache.
The assembly name must be fully qualified with the version, culture, and public key token of the assembly. The fully qualified name must be surrounded by quotes.
Specifies the directory of the. InstallState file that contains the data used to uninstall the assembly. All rights reserved. Installation is done in a transactioned way: If one of the assemblies fails to install , the installations of all other assemblies are rolled back. Uninstall is not transactioned. Any option that occurs before the name of an assembly will apply to that assembly 's installation.
Options are cumulative but overridable - options specified for one assembly will apply to the next as well unless the option is specified with a new value. The default for all options is empty or false unless otherwise specified. The default is to interpret the assembly parameter as the filename of the assembly on disk.
If empty , do not write log. InstallState file will be stored. Default is the directory of the assembly. Individual installers used within an assembly may recognize other options. Enter your search term
0コメント