1. Create a new Windows service, name (Websendmsgsocket, check Properties-version number) Double-click Service1.cs Open Design view, right-click in Design view, choose Add Installer Installing the ServiceProcessInstaller1 and ServiceInstaller1 components
2. Change the ServiceProcessInstaller1 account to LocalSystem and change the servicename of ServiceInstaller1 to the desired service name (WEBSENDMSG)
3. Rename the Service1.cs and start writing the code
4. Regenerate and get a WebSendMsgSocket.exe program in the folder Bin-debug directory that corresponds to the project, then install the program to the service and run it in the service
5. The administrator runs Windows-system32-cmd.exe CD C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319 (note that the version number matches the project version number)
Directory paths for 6.installutil/u project WebSendMsgSocket.exe programs such as C:\just\bin\Debug\WebSendMsgSocket.exe
7.net start websendmsg (service name)
C # Create Socket service