Tutorials
VB.NET 2005
Microsoft .NET Creating Installation Components
Microsoft .NET Creating Installation Components - Page 2
Microsoft .NET Creating Installation Components - Page 3In this tutorial you will learn how to Create installation components, Work with predefined Installation Components, Deploying an Assembly containing the Installation Components, Working with Installer Classes, URL Remoting, Launching a Remote Application, The Download Cache, Code Access Security Policy and Methods of Deployment
Understanding the Installer Class
Installer class is the base class for all custom installers in the .NET Framework. Installers are components that assist in installing applications on a computer. The steps that must be followed to use the installer class are given below:
1. Inherit the System.Configuration.Install.Installer class
2. Override the Install, Commit, Rollback and Uninstall methods
3. Add the System.ComponentModel.RunInstallerAttribute
4. Put your derived class in the assembly with the application to Install
5. Invoke the installers. For this you can use InstallUtil.exe.
Sample code that illustrates the use of System.Configuration.Install.Installer class and creating a class that inherits form it. It also shows the method overrideing.
Click here to view sample code
Working with predefined Installation Components
When deploying an application on a computer which needs the use of a performance counter, the counter must also be installed. Using an installation component, the application can be set up so that it automatically creates and configures the necessary performance counter on a remote computer application is installed. The installation components can be of two types namely, the installer classes added to the projects, and pre-defined installation components that are associated with components.
Predefined installation components are associated on a one-to-one basis with the components that need them. For example, an instance of the MessageQueue component in the project requires that the deployed application has a queue installed and configured—the developer has to create an installation component to handle the task. Then if the developer wants to add an instance of an EventLog component to the project he has to configure the event log in use, and must add a second installation component to perform that processing.
The .NET Framework has five predefined installation components can be used in the projects. They are listed below in the table.
Installer Components
EventLog installer
Allows you to install and configure a custom event log that your application needs in order to run (based on the System.Diagnostics.EventLogInstaller class)
MessageQueue installer
Allows you to install and configure a queue that your application needs in order to run. (based on the System.Messaging.MessageQueueInstaller class)
PerformanceCounter installer
Allows you to install and configure a custom performance counter that your application needs in order to run. (based on the System.Diagnostics.PerformanceCounterInstaller class)
The Service and the ServiceProcess installers
They are used together to allow you to install service applications. (based on the System.ServiceProcess.ServiceInstaller and System.ServiceProcess.ServiceProcessInstaller classes)All of the installation components in a project are stored within classes marked with the RunInstallerAttribute=True. By default, a class named ProjectInstaller that contains this attribute is added to the project when a predefined installation component is added; installer classes added via the Add New Item dialog box also contain this attribute and are named Installer1 by default. Adding predefined installation components to your project. 1. In the designer, click the component for which an installation component is to be added, and then click the Add Installer link in the Properties window. 2. If necessary, access the ProjectInstaller class in the Code Editor and modify any of the values that were copied to the installation component. 3. Override any methods for which need to perform custom processing. 4. Continue to perform steps 1 through 3 for each installation component the project needs. Deploying an Assembly containing the Installation Components Assemblies containing installation components can be deployed by using the setup and deployment projects or by using the Installer tool. Using the Setup Project to Install Component Resources 1. Add a new setup project to the solution and give it a name. 2. Right click the project in the Solution explorer and select Add, Project Output from the menu 3. In the Add Project Output group dialog box select Primary Output of the Project. 4. Open the Customs actions editor for the project and right click the Cutoms Actions Node. Add Custom Action from the shortcut menu. 5. The select item in the Project dialog box appears. 6. In the Application folder select Primary Output from the application(Active). 7. The primary out put will be added to the four nodes under Custom Actions--Install, Commit, Rollback and Uninstall. 8. Select New Project in Solution Explorer. Activate the properties window. 9. Set the Parameters for the application. 10. Build the application and take the project’s output to a computer that does not already have an event source for the application. 11. Run the installation. Deploying an Installation component by using the Installer tool The command line installer tool is used to install assemblies that contain additional component tools. The resources contained in the Assembly1.dll can be installed using installutil.exe. Resources contained in multiple assemblies can also be installed using the installutil.exe. The uninstaller.exe is used to uninstall the assemblies. Working with Installer Classes Customized installer classes can be used to perform custom actions during installation. These compiled Installer classes from the project are added to the deployment project as custom actions that are run at the end of the installation. The process is as under:
|
| hi if i want to download vb.net 2005 how could i get the version? |