win 10服務簡單註冊

2022-01-19 07:37:51 字數 1264 閱讀 3091

1、安裝服務

sc create test3 binpath= "c:\users\administrator\desktop\win32srvdemo\win32srvdemo\debug\win32srvdemo.exe"  

其中:test3為建立的服務名,binpath後面是執行exe檔案的所在路徑

2、配置服務

有以下集中方式:

sc config 服務名 start= auto    (自動)

sc config 服務名 start= demand  (手動)

sc config 服務名 start= disabled(禁用)

例如下面的命令,在xp系統中開機便會自動啟動:

sc config test3 start= auto  

3、開啟服務

net start test3  

4、關閉服務

net stop test3  

5、刪除服務

sc delete test3  

二、為方便使用,可編輯為bat批處理檔案

(新建乙個txt檔案,自己命名,把字尾改為.bat檔案)

1、建立、配置、開啟服務

@echo.服務啟動......  

@echo off  

@sc create test3 binpath= "c:\users\administrator\desktop\win32srvdemo\win32srvdemo\debug\win32srvdemo.exe"  

@net start test3  

@sc config test3 start= auto  

@echo off  

@echo.啟動完畢!  

@pause  

2、關閉服務

@echo.服務關閉  

@echo off  

@net stop test3  

@echo off  

@echo.關閉結束!  

@pause  

3、刪除服務

@echo.服務刪除  

@echo off  

@sc delete test3  

@echo off  

@echo.刪除結束!  

@pause  

win10高危服務

win10哪些服務項可禁用關閉列表 2 computer browser 維護網路上計算機的更新列表,不需要聯網的話可以改為手動 3 diagnostic policy service 診斷策略服務 4 distributed link tracking client 維護計算機內的ntfs檔案之間...

Win10安裝tensorflow 簡單)

conda config add channelsconda config set show channel urls yes安裝anaconda,這裡安裝的是anaconda4.3.0版本,python3.5 conda create name tensorflow python 3.5activ...

win10下新增ssh服務

openssh是linux系統下功能強大的遠端服務和管理工具,現在在windows10系統下也可以使用openssh了。安裝步驟如下 設定 更新和安全 開發者選項 點選 開發人員模式 首先安裝開發人員功能。設定 應用 應用和功能 管理可選功能,新增功能。安裝後,重啟。檢視是否有ssh windows...