批处理,bat,系统服务处理

来源:互联网 发布:年轻女装品牌知乎 编辑:程序博客网 时间:2024/05/16 14:32
 

echo off
:net0
echo off
echo.
echo. ------Fanli139_DataSvr----------
echo. 1.安装/启动服务
echo. 2.启动服务
echo. 3.停止服务
echo. 4.删除服务
echo. 5.退出
echo.
set /p choice=请选择:

if /i %choice%==1 goto net1
if /i %choice%== 2 goto net2
if /i %choice%== 3 goto net3
if /i %choice%== 4 goto net4
if /i %choice%== 5 goto end

goto net0

:net1

echo 1.安装/启动服务

net stop  Fanli139_DataSvr

sc delete Fanli139_DataSvr

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\InstallUtil.exe  Fanli139_DataSvr.exe

net start Fanli139_DataSvr
 
goto net0

:net2
 
echo 2.启动服务

net start Fanli139_DataSvr

goto net0

:net3
 
echo 3.停止服务

net stop  Fanli139_DataSvr

goto net0

:net4
 
echo 4.删除服务

net stop  Fanli139_DataSvr

sc delete Fanli139_DataSvr

goto net0

:end

原创粉丝点击