Explorar el Código

新增 redis 自动安装功能

derrickx hace 1 año
padre
commit
210c559987
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      main.py

+ 1 - 1
main.py

@@ -247,7 +247,7 @@ class MainWindow(QMainWindow, Ui_menu):
             # 检查 Redis 服务是否正在运行
             try:
                 # 使用 ctypes 库检查 Redis 服务是否正在运行
-                service_manager = ctypes.windll.advapi32.OpenServiceA(None, b"redis-server")
+                service_manager = ctypes.windll.advapi32.OpenServiceA(None, b"redis")
                 if service_manager:
                     ctypes.windll.advapi32.CloseServiceHandle(service_manager)
                     print("Redis 服务已安装并正在运行")