]> repos.lx-s.de Git - winmute.git/commitdiff
Improved warning entry for wrong autostart path
authorlx-s <lx-s@users.noreply.github.com>
Fri, 19 Dec 2025 07:27:38 +0000 (08:27 +0100)
committerlx-s <lx-s@users.noreply.github.com>
Fri, 19 Dec 2025 07:27:38 +0000 (08:27 +0100)
WinMute/WMSettings.cpp

index 7be23295d981e398ae09091b0107c7f144b4d5e1..94c3c604a9b499343deab4c9c3b2ba912d24c560 100644 (file)
@@ -366,10 +366,12 @@ bool WMSettings::IsAutostartEnabled()
    } else {
       HKEY hRunKey = OpenAutostartKey(KEY_READ);
       if (hRunKey != nullptr) {
-         std::wstring path;
-         if (ReadStringFromRegistry(hRunKey, LX_SYSTEMS_AUTOSTART_KEY, path)) {
-            if (path != wmPath) {
-               log.LogInfo(L"Autostart entry has wrong path");
+         std::wstring autostartPathFromReg;
+         if (ReadStringFromRegistry(hRunKey, LX_SYSTEMS_AUTOSTART_KEY, autostartPathFromReg)) {
+            if (autostartPathFromReg != wmPath) {
+               log.LogWarning(L"Registry entry for auto start has wrong executable path."
+                              L"Current path \"%s\". Path in registry \"%s\"",
+                              wmPath, autostartPathFromReg.c_str());
             } else {
                isEnabled = true;
             }