建立服務 HelloWindowsService spa
sc create HelloWindowsService binpath= "D:\WindowsService\HelloWindowsService.exe" start= auto displayname= "HelloWindowsService"di
注意:「=」前面沒有空格,後面有空格。vi
卸載服務display
sc delete HelloWindowService(服務名)let