在 Win7、Win2008 環境下,可使用 sc create 指令快速建立 Windows Service 系統服務。
cmd,右鍵選擇「以系統管理員身分執行」開啟命令提示字元。sc create NCPRetrieverService binPath= "D:\Production\Application\NCP\NotificationRetriever\NotificationRetriever.exe"
指令說明:NCPRetrieverService 為服務名稱,binPath 指向執行檔完整路徑,路徑含空格時需雙引號括住。