Skip to content

Services: Fall back to registry for protected configuration changes - #2990

Open
NotEnsoul wants to merge 3 commits into
winsiderss:masterfrom
NotEnsoul:service-registry-fallback
Open

Services: Fall back to registry for protected configuration changes#2990
NotEnsoul wants to merge 3 commits into
winsiderss:masterfrom
NotEnsoul:service-registry-fallback

Conversation

@NotEnsoul

Copy link
Copy Markdown
Contributor

Description

Problem

Some protected services reject configuration changes through the Service Control Manager even after elevation. The service properties dialog previously reported the failure without providing another path for applying the requested configuration.

Local debug builds could also fail to connect to their elevated phsvc helper when an installed release helper owned the shared port, or when API-build signature validation rejected the unsigned debug executable.

Solution

  • Fall back to updating the service registry key when SCM configuration fails.
  • Open protected service keys with backup/restore semantics under the elevated helper.
  • Support service type, start type, error control, image path, load-order group, account name, display name, and delayed auto-start values.
  • Do not use the registry fallback for password changes because service passwords are stored as LSA secrets.
  • Return whether phsvc used the registry fallback so the UI can explain that Windows must be restarted.
  • Allow an unelevated System Informer instance to apply the fallback through its temporary UAC-elevated phsvc helper.
  • Give debug builds separate native and WOW64 phsvc port names and retain same-executable validation for unsigned local debug binaries.
  • Preserve catalog hash errors before cleanup and correctly normalize Win32-facility HRESULT values discovered while testing the debug build.

Notes

Registry fallback changes are not observed by the running Service Control Manager. The dialog informs the user that Windows must be restarted before the new service configuration takes effect.

@NotEnsoul
NotEnsoul requested review from dmex and jxy-s as code owners July 12, 2026 16:34
Comment thread SystemInformer/srvprp.c
@dmex dmex self-assigned this Jul 12, 2026
@dmex dmex added postponed Delayed until a dependency or issue is resolved Blocked Delayed until a dependency or issue is resolved labels Jul 12, 2026
@dmex

dmex commented Jul 12, 2026

Copy link
Copy Markdown
Collaborator

The PR is on hold temporarily due to pending changes to phsvc.

@NotEnsoul

Copy link
Copy Markdown
Contributor Author
obraz

@jxy-s jxy-s left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks! Leaving my approval, but let's wait on @dmex to unblock before merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Blocked Delayed until a dependency or issue is resolved postponed Delayed until a dependency or issue is resolved

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants