microsoft / microsoft/PowerToys

MWB: inverted logic in logging causes false ‘service path is not correct’ warning in log file

Open Beginner friendly
#46,629 0 comments 0 reactions 0 assignees View on GitHub
Issue-Bug Needs-Triage Product-Mouse Without Borders
Dominant language
C
Stars
139k
Forks
8.6k
PR merge metrics
PR metrics pending

Description

### Microsoft PowerToys version

v0.98.1

### Installation method

GitHub

### Area(s) with issue?

Mouse Without Borders

### Steps to reproduce

Start PowerToys with Mouse Without Borders enabled.

If everything is configured correctly, an erroneous warning is logged to the Mouse Without Borders "module interface" log file:

```
[2026-03-30 14:20:13.591353] [p-106032] [t-43524] [warning] The service path is not correct. Current: "C:\...\PowerToys.MouseWithoutBordersService.exe" C:\Users\...\AppData\Local Expected: "C:\...\PowerToys.MouseWithoutBordersService.exe" C:\Users\....\AppData\Local
```

It looks like it's cause by this code:

https://github.com/microsoft/PowerToys/blob/0b7d780980ce342dc76ea81977b2c705f056628c/src/modules/MouseWithoutBorders/ModuleInterface/dllmain.cpp#L261-L265

I think the ```if``` condition should be inverted:

```
if ( ! isServicePathCorrect )
```

since later code uses the *negated* value as a test for updating the path:

https://github.com/microsoft/PowerToys/blob/0b7d780980ce342dc76ea81977b2c705f056628c/src/modules/MouseWithoutBorders/ModuleInterface/dllmain.cpp#L295-L297

### ✔️ Expected Behavior

No warning to be logged if things are configured correctly.

### ❌ Actual Behavior

Incorrect warning logged to Mouse Without Borders module interface log file

### Upload Bug Report ZIP-file

_No response_

### Additional Information

_No response_

### Other Software

_No response_

Contributor guide

Open the contributing guide

Research direction

Start in src/modules/MouseWithoutBorders/ModuleInterface/dllmain.cpp around lines 261-265 and compare the warning condition with the path-update check around lines 295-297. Reproduce startup with Mouse Without Borders correctly configured, then verify that the module interface log no longer reports a false service-path warning while incorrect paths still follow the existing update behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
desktop
Issue type
Bug
Difficulty
1/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
78/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.