Skip to content

Commit

Permalink
win: improve service disabling as TrustedInstaller
Browse files Browse the repository at this point in the history
This commit changes the mechanism to disable services using
TrustedInstaller privileges, improving consistency and flexibility.

Key changes:

- Introduce `DisableServiceInRegistryAsTrustedInstaller` as a shared
  function to standardize the disabling process. This function aligns
  with existing ones to facilitate easier testing and method switching.
- Update the revert logic to avoid unnecessary service restarts when
  they are manually started.
- Enhance readability with added comments in generated code sections.
- Improve documentation for `DisableService` and
  `DisableServiceInRegistry` to reflect new functionalities.
- Support multiline code in `RunInlineCodeAsTrustedInstaller` for
  complex scenarios.

Other supporting changes:

- Remove redundant TrustedInstaller privileges in the `Sense` service
  disabling.
- Document default service statuses to inform about service behaviors
  across different Windows versions.
  • Loading branch information
undergroundwires committed Jul 6, 2024
1 parent cca397c commit 5d365f6
Showing 1 changed file with 215 additions and 49 deletions.
Loading

0 comments on commit 5d365f6

Please sign in to comment.