Skip to content

[BUG REPORT] - Embedded quotes in %serviceName% code smell with uncertain runtime impact #20

@SegoCode

Description

@SegoCode

Description

In code/modules/services.bat, lines 130–144 assign service names using the pattern:
if %N%==1 (set serviceName="lfsvc")
if %N%==2 (set serviceName="MapsBroker")
...
In CMD, set serviceName="lfsvc" stores the literal string "lfsvc" including the double-quote characters as part of the value. The correct idiomatic pattern to avoid this is:
if %N%==1 (set "serviceName=lfsvc")

Steps to reproduce

  1. Run services.bat as Administrator on any Windows 10/11 machine.
  2. Pick any service from the menu (e.g., option [1] Location Foundation Service).
  3. Note its current state displayed in the menu ([Disabled] in green or [Enabled] in red).

Expected behavior

Disable path (expected: Enabled → Disabled):

  1. If the service shows [Enabled], select its number and press Enter.
  2. The menu should refresh with the service now showing [Disabled].
  3. If it does → disable path works.

Actual behavior

Enable path (expected: Disabled → Enabled):

  1. Now the service shows [Disabled]. Select its number again and press Enter.
  2. The menu should refresh with the service now showing [Enabled].
  3. If it does → enable path works, bug does not manifest.
  4. If it stays [Disabled] → enable path is broken, bug confirmed.

OS version

Windows 11

Confirmation

  • I performed a search of the issue tracker to avoid opening a duplicate issue
  • I understand that not filling out this template correctly may lead to the issue being closed

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions