用友U8服务便捷管理工具
1、以右键管理员运行该批处理文件
2、第一次运行的话请输入 5 ,将所有的服务均设置为“手动”,以后就不用了。
3、输入 7,将U8和SQL服务器的所有服务关闭。以后在想使用U8,只需要 输入6,将U8和SQL服务器的五福顺序开启,就可以直接使用了,使用完之后顺序关闭就好了。
1、这里用到了批处理
net start 服务名 开启服务
net stop 服务名 关闭服务
sc config 服务名 start= [auto=自动,demand=手动,disable=禁用]
例如:将UFNet设置为手动启动
sc config UFNet start= auto
2、将如下代码保存为bat文件(先保存成txt文档,然后将.txt改为.bat就可以了)
:sc config 服务名 start= [auto=自动,demand=手动,disable=禁用]
@echo off
title U8系统服务管理器-By 疯雪
:AllStart
cls
echo 1、启动U8服务
echo 2、关闭U8服务
echo 3、启动Sql Server服务
echo 4、关闭Sql Server服务
echo 5、U8、Sql Server服务设置为“手动”
echo 6、顺序启动U8、Sql Server服务
echo 7、顺序关闭U8、Sql Server服务
echo 8、退出
set input=
set /p input=请输入序号:
if "%input%"=="1" goto U8Start
if "%input%"=="2" goto U8Stop
if "%input%"=="3" goto SQLServerStart
if "%input%"=="4" goto SQLServerStop
if "%input%"=="5" goto setstyle
if "%input%"=="6" goto alltorun
if "%input%"=="7" goto alltostop
if "%input%"=="8" goto exit
:U8Start
echo 启动 U8AuthServer(UFNet) 服务...
net start UFNet
echo 启动 U8DispatchService 服务...
net start U8DispatchService
echo 启动 U8KeyManagePool 服务...
net start U8KeyManagePool
echo 启动 U8MPool 服务...
net start U8MPool
echo 启动 U8SCMPool 服务...
net start U8SCMPool
echo 启动 U8TaskService 服务...
net start U8TaskService
echo 启动 UFReportService 服务...
net start UFReportService
goto the-end
:U8Stop
echo 停止 U8AuthServer(UFNet) 服务...
net stop UFNet
echo 停止 U8DispatchService 服务...
net stop U8DispatchService
echo 停止 U8KeyManagePool 服务...
net stop U8KeyManagePool
echo 停止 U8MPool 服务...
net stop U8MPool
echo 停止 U8SCMPool 服务...
net stop U8SCMPool
echo 停止 U8TaskService 服务...
net stop U8TaskService
echo 停止 UFReportService 服务...
net stop UFReportService
goto the-end
:SQLServerStart
echo 启动 SQL Server (MSSQLSERVER) 服务...
net start MSSQLSERVER
echo 启动 SQL Server VSS Writer 服务...
net start SQLWriter
goto the-end
:SQLServerStop
echo 停止 SQL Server (MSSQLSERVER) 服务...
net stop MSSQLSERVER
echo 停止 SQL Server VSS Writer 服务...
net stop SQLWriter
goto the-end
:setstyle
sc config UFNet start= demand
sc config U8DispatchService start= demand
sc config U8KeyManagePool start= demand
sc config U8MPool start= demand
sc config U8SCMPool start= demand
sc config U8TaskService start= demand
sc config UFReportService start= demand
sc config MSSQLSERVER start= demand
sc config SQLWriter start= demand
goto the-end
:alltorun
echo 启动 SQL Server (MSSQLSERVER) 服务...
net start MSSQLSERVER
echo 启动 SQL Server VSS Writer 服务...
net start SQLWriter
goto U8Start
:alltostop
echo 停止 U8AuthServer(UFNet) 服务...
net stop UFNet
echo 停止 U8DispatchService 服务...
net stop U8DispatchService
echo 停止 U8KeyManagePool 服务...
net stop U8KeyManagePool
echo 停止 U8MPool 服务...
net stop U8MPool
echo 停止 U8SCMPool 服务...
net stop U8SCMPool
echo 停止 U8TaskService 服务...
net stop U8TaskService
echo 停止 UFReportService 服务...
net stop UFReportService
goto SQLServerStop
:exit
exit
:the-end
echo 如果提示“系统错误 5”,请右键以管理员权限运行...
pause
goto AllStart