From c495e657839d1016e7499480f44777f75b5a67b8 Mon Sep 17 00:00:00 2001 From: me Date: Thu, 21 Aug 2025 11:20:24 +0900 Subject: [PATCH 1/2] nut.exe are call upsdrvctl.exe in bin. but upsdrvctl.exe located in sbin. So, change bin to sbin. --- scripts/Windows/wininit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/Windows/wininit.c b/scripts/Windows/wininit.c index f305b3a955..6b4e36ef67 100644 --- a/scripts/Windows/wininit.c +++ b/scripts/Windows/wininit.c @@ -148,7 +148,7 @@ static DWORD run_drivers(void) char command[NUT_PATH_MAX]; char *path; - path = getfullpath(PATH_BIN); + path = getfullpath(PATH_SBIN); if (nut_debug_level < 1) { snprintf(command, sizeof(command), "%s\\upsdrvctl.exe start", path); } else { From da0075b9afc03530f7625a45e064a084d8a8410e Mon Sep 17 00:00:00 2001 From: me Date: Thu, 21 Aug 2025 11:37:41 +0900 Subject: [PATCH 2/2] In case of WIN32 build, most drivers are located in "bin". but referred Relative running path, it is "sbin". So changing to "NULL(running path)" to "bin" --- drivers/upsdrvctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/upsdrvctl.c b/drivers/upsdrvctl.c index 645a8cc0ef..6e4c022a91 100644 --- a/drivers/upsdrvctl.c +++ b/drivers/upsdrvctl.c @@ -1652,7 +1652,7 @@ int main(int argc, char **argv) #ifndef WIN32 driverpath = xstrdup(DRVPATH); /* set default */ #else /* WIN32 */ - driverpath = getfullpath(NULL); /* Relative path in WIN32 */ + driverpath = getfullpath(PATH_BIN); /* Relative path in WIN32 */ #endif /* WIN32 */ atexit(exit_cleanup);