Package and install windows Services and General win programs

Source: Internet
Author: User

Windows Service and General win Program Package Installation Method 1: (1) create a new windows Service Project Server1 (2) Open Service1 Code view, locate OnStart, and add code (3) switch to the design view, right-click to add the installation program www.2cto.com (4), and switch to the newly generated project installer. in the cs design view, locate serviceProcessInstaller1, set the Account attribute to LocalSystem, and set the ServiceName attribute of serviceInstaller1 to Server1 (Service name ), startType is set to Automatic (the service is automatically started when the system starts) (5). Close the project just now. (6) create a new installation project ServerSetup (we set up an installation project for the service just now) (7), right-click, add, project output, Master output, select Service1, and click OK (8), right-click-View-custom operation-custom Operation Right-click-add custom operation-open application folder-select the primary output just now-OK (9), re-generate this installation project-right-click-install (10), in the Service Manager (my computer-right-click-Manage-service and application-service) Find Server1 service, start the service and install and deploy a general win program to install and deploy the windows Service. The installation will be a win program, and you must uninstall it through the control panel. Method 2: Install the bat file in the windows Service Directory (usually bin/debug/) as follows: % SystemRoot % \ Microsoft. NET \ Framework \ v4.0.30319 \ installutil.exe windowsservice application .exe Net Start service name SC config service name = autopause (This shows debugging information) www.2cto.com uninstall as follows: % SystemRoot % \ Microsoft. NET \ Framework \ v4.0.30319 \ installutil.exe/u windowsservice Application name .exe or SC delete service name

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.