- Home
- Products
- Integration
- Tutorial
- Barcode FAQ
- Purchase
- Company
Creating an Installer for the Service in Visual C#.NET
Creating an Installer for the Service UCC - 12 Creator In Visual C# Using Barcode creation for .NET Control to generate, create UPC-A Supplement 2 image in VS .NET applications. Recognize UPC-A In Visual C#.NET Using Barcode reader for .NET framework Control to read, scan read, scan image in .NET framework applications. The next step is to create an installer for the service You can then use the installer to install the service onto the destination computer and make sure that it is recording to the Event Log properly Follow these steps to create the installer: 1 Change back to the Design view and click on the background Do not select anything 2 Make sure that the Properties Explorer is displayed, and click the Add Installer link from the bottom of the Properties Explorer window (The mouse pointer in Figure 26-5 points out the link) EXAM TIP The Add Installer link is found in the Properties Explorer window 3 Change to the Design view for ProjectInstallercs (the class that is created by adding the installer) You will notice two instances of the installer serviceProcessInstaller1 and serviceInstaller1 (shown here) Bar Code Printer In Visual C# Using Barcode creator for .NET framework Control to generate, create bar code image in .NET applications. Bar Code Recognizer In C# Using Barcode decoder for .NET Control to read, scan read, scan image in Visual Studio .NET applications. 26: Windows Services
UPC Symbol Encoder In .NET Framework Using Barcode drawer for ASP.NET Control to generate, create UPC-A Supplement 2 image in ASP.NET applications. Encode UCC - 12 In Visual Studio .NET Using Barcode encoder for .NET framework Control to generate, create UPC A image in VS .NET applications. Figure 26-5 Painting GS1 - 12 In Visual Basic .NET Using Barcode encoder for .NET Control to generate, create UPC-A Supplement 5 image in .NET framework applications. EAN / UCC - 14 Printer In C#.NET Using Barcode drawer for .NET framework Control to generate, create GTIN - 128 image in .NET framework applications. Add an installer link
Draw Matrix 2D Barcode In Visual C# Using Barcode maker for Visual Studio .NET Control to generate, create 2D Barcode image in VS .NET applications. Creating Barcode In Visual C# Using Barcode creation for Visual Studio .NET Control to generate, create barcode image in .NET framework applications. PART V
Code 128 Code Set B Creation In Visual C#.NET Using Barcode generator for .NET Control to generate, create Code 128 Code Set A image in Visual Studio .NET applications. 2 Of 5 Industrial Drawer In Visual C# Using Barcode generator for .NET Control to generate, create 2/5 Industrial image in VS .NET applications. One is the installer for your service (the latter), and the other is the installer for the service s associated process, which we will discuss in the Windows Service Architecture section later in this chapter USS Code 128 Generation In Java Using Barcode creator for Android Control to generate, create Code-128 image in Android applications. Matrix Barcode Creation In .NET Framework Using Barcode encoder for Visual Studio .NET Control to generate, create Matrix 2D Barcode image in .NET applications. MCAD/MCSD Visual C# NET Certification All-in-One Exam Guide
Bar Code Scanner In Visual C# Using Barcode recognizer for VS .NET Control to read, scan read, scan image in .NET framework applications. Barcode Scanner In None Using Barcode recognizer for Software Control to read, scan read, scan image in Software applications. 4 Select serviceInstaller1 and set the Name and ServiceName properties in the Properties Explorer: Paint UCC.EAN - 128 In Java Using Barcode generation for Java Control to generate, create GTIN - 128 image in Java applications. Matrix Barcode Generation In Visual Basic .NET Using Barcode printer for Visual Studio .NET Control to generate, create Matrix 2D Barcode image in Visual Studio .NET applications. 5 Make sure that the StartType is set to Automatic You are now ready to build the project As a final step, you should set the startup object to ClockService Do this by selecting the project in the Solution Explorer and right-clicking to access the submenu Select Properties from the menu, and you will see the Property Pages dialog box shown in Figure 26-6 Select the General option in the left pane, the Startup Object option in the right pane, and select your new service ClockServiceClockService from the drop-down list Click OK to accept the properties, and then build the project by pressing CTRL-SHIFT-B (or by selecting Build | Build from the menus) Bar Code Reader In Visual Studio .NET Using Barcode Control SDK for ASP.NET Control to generate, create, read, scan barcode image in ASP.NET applications. Drawing Code 3/9 In None Using Barcode creator for Font Control to generate, create Code 39 Extended image in Font applications. Creating the Setup Project for the Windows Service
In order to be able to add the new service to any computer, you need to create a mechanism to deploy the service We will create a deployment scenario by building a Setup project The executable for our service, ClockServiceexe, will be added to the Setup project, and then we can see what happens as the service is loaded into a computer Follow these steps to create the Setup project: 1 Add a Setup project to the solution Select File | Add Project, and choose New Project Select Setup and Deployment Projects in the left pane of the Add New Project dialog box, and select Setup Project from the list of templates 26: Windows Services
2 Name the Setup project MyClockServiceSetup in the Solution Explorer
PART V
Figure 26-6 The project s Property Pages
MCAD/MCSD Visual C# NET Certification All-in-One Exam Guide
3 Add the executable to the Setup project by right-clicking on MyClockServiceSetup and selecting Add | Project Output 4 You will see the Add Project Output Group dialog box shown next Make sure your project (ClockService) is in the Project field Choose Primary Output and click OK to add the executable to the project 5 Now you need to add a custom action to the Setup project to install the executable file Right-click on the Setup project and select View | Custom Actions from the menu You will see the Customer Actions editor Choose Add Custom Action 6 In the Select Item in Project dialog box, select the Application Folder from the Look In drop-down box Then select Primary Output from ClockService (Active), as shown next 26: Windows Services
7 You will notice that the primary output has been added to all four nodes Install, Commit, Rollback, and Uninstall: PART V
8 Build the Setup project and exit Visual Studio NET You have now successfully created a Setup project for your Windows service If you are unsure of the purpose of any of the preceding steps, be sure to spend some time in 30 The setup and deployment of Windows services, NET Remoting, and XML Web Services will be covered in that chapter
|
|