创建服务 HelloWindowsService
sc create HelloWindowsService binpath= "D:\WindowsService\HelloWindowsService.exe" start= auto displayname= "HelloWindowsService"
注意:“=”前面没有空格,后面有空格。
卸载服务
sc delete HelloWindowService(服务名)