@echo off
title stop/start windows service
:allStart
cls
echo [1] MySQL
echo [2] Apache
echo [3] Windows Update
echo [4] Oracle
echo [5] VMWare
echo [e] exit
set in=
set /p in=please enter the num:
if "%in%"=="1" goto mysql
if "%in%"=="2" goto apache
if "%in%"=="3" goto windowsUpdate
if "%in%"=="4" goto Oracle
if "%in%"=="5" goto Vmware
if "%in%"=="e" goto allClose
:mysql
cls
echo [1] start mysql service
echo [2] stop mysql service
echo [b] go back
echo [e] exit
set in=
set /p in= please enter the num:
if "%in%"=="1" goto mysqlStart
if "%in%"=="2" goto mysqlStop
if "%in%"=="b" goto allStart
if "%in%"=="e" goto allClose
:apache
cls
echo [1] start apache service
echo [2] stop apache service
echo [b] go back
echo [e] exit
set in=
set /p in= please enter the num:
if "%in%"=="1" goto apacheStart
if "%in%"=="2" goto apacheStop
if "%in%"=="b" goto allStart
if "%in%"=="e" goto allClose
:windowsUpdate
cls
echo [1] start windows update service
echo [2] stop windows update service
echo [b] go back
echo [e] exit
set in=
set /p in= please enter the num:
if "%in%"=="1" goto windowsUpdateStart
if "%in%"=="2" goto windowsUpdateStop
if "%in%"=="b" goto allStart
if "%in%"=="e" goto allClose
:Oracle
cls
echo [1] start oralce service
echo [2] stop oracle service
echo [b] go back
echo [e] exit
set in=
set /p in= please enter the num:
if "%in%"=="1" goto oracleStart
if "%in%"=="2" goto oracleStop
if "%in%"=="b" goto allStart
if "%in%"=="e" goto allClose
:Vmware
cls
echo [1] start VMware service
echo [2] stop VMware service
echo [b] go back
echo [e] exit
set in=
set /p in= please enter the num:
if "%in%"=="1" goto VmwareStart
if "%in%"=="2" goto VmwareStop
if "%in%"=="b" goto allStart
if "%in%"=="e" goto allClose
:mysqlStart
net start MySQL
goto allStart
:mysqlStop
net stop MySQL
goto allStart
:apacheStart
net start Apache2.2
goto allStart
:apacheStop
net stop Apache2.2
goto allStart
:windowsUpdateStart
net start wuauserv
goto allStart
:windowsUpdateStop
net stop wuauserv
goto allStart
:oracleStart
net start OracleOraDb11g_home1TNSListener
net start OracleServiceORCL
net start OracleDBConsoleorcl
goto allStart
:oracleStop
net stop OracleOraDb11g_home1TNSListener
net stop OracleServiceORCL
net stop OracleDBConsoleorcl
goto allStart
:VmwareStart
net start VMAuthdService
net start VMnetDHCP
net start "VMware NAT Service"
net start VMUSBArbService
net start VMwareHostd
goto allStart
:VmwareStop
net stop VMAuthdService
net stop VMnetDHCP
net stop "VMware NAT Service"
net stop VMUSBArbService
net stop VMwareHostd
goto allStart
:allClose
echo please enter any key to exit
pause
exit
rem ## how to delete the service in the windows?
rem ## sc delete [service name]
rem ## windows+R --> cmd --> services.msc
相关推荐
本文将深入探讨如何使用BAT脚本来检测和安装Windows服务程序,以及涉及的相关知识点。 首先,我们需要理解什么是Windows服务。Windows服务是Windows操作系统中一种特殊的后台程序,它们在用户无须登录的情况下运行...
windows启动nginx脚本
在Windows环境下,Spring Boot项目通常以jar包的形式发布,以便于...通过理解这些知识点,你可以更有效地管理和维护基于Spring Boot的Java应用,特别是在Windows环境中,利用bat脚本进行自动化启动能显著提高工作效率。
windows下启动java jar包的bat脚本 javaw后台启动,jdk1.8或者更高,winserver 2016 经过测试
windows环境下,启动java服务的bat脚本。注意修改: START "app" javaw -jar 服务jar包名.jar
在给定的“通过BAT脚本检测并安装WINDOWS服务程序.rar”压缩包中,我们有两个重要的脚本文件:`install.bat` 和 `uninstall.bat`,分别用于安装和卸载Windows服务。这里我们将详细讨论如何通过BAT脚本来检测和管理...
Windows系统下 启动tomcat服务bat 可执行脚本,当开发人员想要通过在java中开发一个启动Windows系统下tomcat的脚本文件时,就可以使用我这个
启动某个端口服务的bat脚本,可以配合windows定时任务使用,监控服务是否挂掉,挂掉的话启动服务
下面将详细介绍如何使用shell脚本(适用于Unix/Linux系统)和bat脚本(适用于Windows系统)来运行Java程序。 **shell脚本运行Java程序** 在Unix/Linux环境中,我们可以创建一个.sh文件作为shell脚本来执行Java程序...
本文将深入解析标题为"windows上一键安装mysql的bat脚本(实测)"的相关知识点,包括如何创建和理解批处理脚本,以及如何配置MySQL。 首先,批处理脚本(BAT)是基于DOS命令的一种程序,它可以执行一系列预先定义的...
"Springboot-服务-Windows 一键启动、停止脚本"这个主题关注的是如何为Spring Boot应用程序创建自定义的批处理脚本来执行这些操作。批处理脚本是Windows操作系统中的文本文件,扩展名为`.bat`,它们包含了可执行的...
@echo off REM 将引号内部分改成你要查找的服务名称 sc query |find /i "CscService" >nul 2>nul REM 如果服务存在,跳转至exist标签 if not errorlevel 1 (goto exist) else goto notexist
在Windows操作系统中,批处理(BAT)脚本和Visual Basic Script(VBS)脚本是两种常见的自动化工具,用于执行一系列命令或者实现特定的功能。这个"windows常用bat/vbs脚本合集"可能是包含了多种实用脚本的集合,旨在...
windows下bat文件命令自启动jar包及监控脚本(已经过测试)
在"启动redis和nacos.bat"脚本中,应该包含了启动Nacos服务的相关命令,可能是通过运行Nacos的启动脚本或直接调用其Java可执行jar包。 Redis是一个高性能的键值存储系统,常被用作数据库、缓存和消息代理。它支持...
Windows一键启动Eureka和Cassandra和redis-server的脚本.bat
spring boot windows 启动脚本
总之,Redis在Windows上的运行涉及到下载合适的二进制文件、配置`redis.windows.conf`、使用`redis.bat`脚本启动服务,以及使用Redis命令行客户端或图形工具进行交互。理解这些步骤对于在Windows环境下高效地使用...
5. **设置服务**:脚本会将MySQL注册为Windows服务,这样可以通过服务管理器启动、停止或重启MySQL服务器。 6. **设置密码**:为了提高安全性,脚本可能会包含一个步骤来设置root用户的初始密码。 7. **启动服务**...
浏览器bat脚本截图是一种高效的方法,它允许用户无需安装额外的浏览器插件就能截取整个网页的图片。这种技术基于批处理(BAT)文件,这是一种简单的脚本语言,用于自动化执行一系列命令行操作。在本案例中,"aa.bat...