bat命令獲取mysql路徑

set TEMP_FILE=mysqlpath.txt

sc qc mysql | find /i "BINARY_PATH_NAME" > %TEMP_FILE%

for /f "tokens=3 delims= " %%i in (%TEMP_FILE%) do set MYSQLD_PATH=%%i

del /s /q %TEMP_FILE%

echo %MYSQLD_PATH%
相關文章
相關標籤/搜索