Repository navigation
feat!: 支持修改应用包服务的启动类型 - #112
Open
digital-bombyx wants to merge 4 commits into
Open
digital-bombyx wants to merge 4 commits into
digital-bombyx wants to merge 4 commits into
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 60305212a5
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
MSIX 包安装的服务(如 Claude 的 CoworkVMService)的安全描述符只允许 NT SERVICE\AppXSvc 修改配置,管理员与 SYSTEM 修改启动类型均被 SCM 拒绝。SCM 拒绝且目标为包服务时,界面先确认,再将 Start(自动启动时含 DelayedAutostart)写入该服务的注册表项。注册表值与 SCM 当前值不同时,服务列表显示待生效的启动类型。 BREAKING CHANGE: 特权服务 IPC 协议从 11 升至 12,已有服务需要更新。
启停服务与修改启动类型失败时,此前沿用结束进程的错误文案(“无法结束…”)。现改用服务专属文案并显示服务的显示名称,访问被拒时提示安全软件可能保护自身服务。
以管理员身份运行或特权服务可用时,服务操作仍被拒绝,多半是服务自身的保护(如杀毒软件的自我保护)。此时提示改为说明这一点,不再建议启用特权服务或以管理员身份运行。
仅当 Argus 以管理员身份运行或特权服务可用时,SCM 拒绝修改应用包服务才询问是否写入注册表;写入同样需要管理员权限,其他情况直接显示原有的权限提示,不再在确认后出现第二次错误。 “启动类型”列的固定宽度一并计入“(重启后生效)”的待生效文案,较长的语言不再被截断;按启动类型排序时,有待生效值的服务按显示的类型排列。
digital-bombyx
force-pushed
the
feat/packaged-service-start-type
branch
from
November 14, 2026 17:55
5c86c93 to
da65f8d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
改动内容 / Changes
MSIX 应用包安装的服务(
SERVICE_PKG_SERVICE,例如 Claude 的CoworkVMService)无法修改启动类型,管理员也不行。应用包为服务设置的安全描述符只允许NT SERVICE\AppXSvc修改配置:DACL 中没有 Administrators 和 SYSTEM,因此 Argus(无论以管理员身份运行还是通过特权服务)和 services.msc 都会被拒绝。但服务的注册表项仍是常规 ACL。
Start(自动启动时含DelayedAutostart)写入该服务的注册表项。ServiceStartTypeRegistry:先通过 SCM 确认目标是包服务,否则拒绝;服务名校验与其他服务操作相同。BREAKING CHANGE:特权服务 IPC 协议从 11 升至 12。
Packaged (MSIX) services deny
SERVICE_CHANGE_CONFIGto everyone exceptNT SERVICE\AppXSvc, so their startup type couldn't be changed even as administrator. After the SCM refuses, Argus now asks and writesStartto the service's registry key; a registry value the SCM hasn't picked up shows as pending. Also fixes the error text for failed service actions (it said "Couldn't end…").检查清单 / Checklist
<type>(<scope>): <描述>)/ The title and commit messages follow Conventional Commitsstart.bat check通过 /start.bat checkpassesclippy -D warnings、i18n、Rust 测试通过(argus-service中 3 个安装锁测试在干净的 main 上同样失败)。check:generated在干净的 main 上也不通过:生成器会删掉dispatch.rs仍在使用的TrayIcon、TrayMenu导入,本 PR 新增的条目与生成结果一致。docs/中对应的页面 / Behavior changes are reflected indocs/locales/的中文与英文目录 / New text is in both the Chinese and English catalogs underlocales/(8 种语言均已添加)截图:确认框、待生效的启动类型、Malwarebytes 的新错误提示。
手动测试:
CoworkVMService经确认框在“自动”与“手动”间切换,用sc qc和注册表核对;普通服务仍直接通过 SCM 修改,不弹确认框;MBAMService显示新的服务错误文案。截图 / Screenshots