Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
win: improve service disabling as TrustedInstaller
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