@echo offrem Copyright (c) 2019 Moses and/or its affiliates.rem Get Administrator Rightsnul 21 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"if '%errorlevel%' NEQ '0' (goto UACPrompt) else ( goto gotAdmin ):UACPromp
@echo off rem Copyright (c) 2019 Moses and/or its affiliates. rem Get Administrator Rights >nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system" if '%errorlevel%' NEQ '0' ( goto UACPrompt ) else ( goto gotAdmin ) :UACPrompt echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs" echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\getadmin.vbs" "%temp%\getadmin.vbs" exit /B :gotAdmin if exist "%temp%\getadmin.vbs" ( del "%temp%\getadmin.vbs" ) rem start net start MySQL56
注:复制下来保存为.bat即可,如乱码,另存为ANSI格式即可
到此这篇关于使用 windows bat 脚本命令 一键启动MySQL服务的方法的文章就介绍到这了,更多相关bat 脚本一键启动MySQL服务内容请搜索易盾网络以前的文章或继续浏览下面的相关文章希望大家以后多多支持易盾网络!