To retire the old server, the custom Windows service above will be migrated:
First, create a service
(1) Copy the files required by the custom Windows service to the new server;
(2) Use PowerShell to create a new Windows service on the new server with the following command:
New-service–name orderservice–displayname orderservice–binarypathname "D:\order\OrderService.exe" –startuptype Automatic
650) this.width=650; "style=" border-bottom:0px;border-left:0px;border-top:0px;border-right:0px; "title=" image " Border= "0" alt= "image" Src= "http://img1.51cto.com/attachment/201407/31/907015_1406789319Tm8e.png" height= "123"/ >
(3) Check creation success;
650) this.width=650; "style=" border-bottom:0px;border-left:0px;border-top:0px;border-right:0px; "title=" image " Border= "0" alt= "image" Src= "Http://img1.51cto.com/attachment/201407/31/907015_14067893205gjx.png" height= "39"/ >
Ii. Deletion of services
(1) If it is found that in the process of creating the error, you can use the following command to delete and rebuild the new service;
SC Delete OrderService
For a detailed description of the New-service command, see URL: http://technet.microsoft.com/zh-cn/library/hh849830.aspx
This article is from the "Margin with Wish" blog, please be sure to keep this source http://281816327.blog.51cto.com/907015/1533269