Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ This is not a copy of the modern Task Manager. CPU and GPU details come from sys
- **CPU** shows the processor name, effective frequency, topology, caches, virtualization, ISA features, system rates, and a 60-second utilization graph.
- **GPU** handles multiple adapters and engines, dedicated and shared memory, temperature, driver details, and DirectX information.
- **Networking and Users** show adapter throughput history and Windows session state.
- **Services** lists Win32 services with description, status, startup type, and the owning process. Start, stop, and Go to Process run only when the current row allows them. Go to Process requires a process id plus creation time.
- **Services** lists Win32 services with description, status, startup type, and the owning process. Start, stop, pause, continue, and Go to Process run only when the current row allows them. Go to Process requires a process id plus creation time.

## Download

Expand Down
2 changes: 1 addition & 1 deletion README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
- **CPU**:处理器型号、有效频率、拓扑、缓存、虚拟化、ISA、系统速率计数和 60 秒总利用率历史。
- **GPU**:多适配器、多引擎、专用/共享显存、温度、驱动和 DirectX 信息。
- **网络与用户**:网卡吞吐历史、会话状态和常用会话操作。
- **服务**:列出 Win32 服务的名称、描述、状态、启动类型和所属进程。启动、停止和转到进程只在当前行允许时可用。转到进程同时要求进程 ID 和创建时间。
- **服务**:列出 Win32 服务的名称、描述、状态、启动类型和所属进程。启动、停止、暂停、继续和转到进程只在当前行允许时可用。转到进程同时要求进程 ID 和创建时间。

## 下载

Expand Down
8 changes: 8 additions & 0 deletions build_support/localization.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,14 @@ const MENU_STATUS_HELP_KEYS: &[(&str, &str)] = &[
"IDM_SERVICE_STOP",
"crate::ui::resource_ids::IDM_SERVICE_STOP",
),
(
"IDM_SERVICE_PAUSE",
"crate::ui::resource_ids::IDM_SERVICE_PAUSE",
),
(
"IDM_SERVICE_CONTINUE",
"crate::ui::resource_ids::IDM_SERVICE_CONTINUE",
),
(
"IDM_SERVICE_GOTOPROCESS",
"crate::ui::resource_ids::IDM_SERVICE_GOTOPROCESS",
Expand Down
6 changes: 6 additions & 0 deletions localization/de.toml
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,8 @@ ServicesPageTitle = "Dienste"
ServicesMenu = "&Dienste"
ServiceStart = "&Starten"
ServiceStop = "S&toppen"
ServicePause = "&Anhalten"
ServiceContinue = "&Fortsetzen"
ServiceColumnName = "Name"
ServiceColumnDescription = "Beschreibung"
ServiceColumnStartupType = "Starttyp"
Expand All @@ -325,6 +327,8 @@ ServiceStartupManual = "Manuell"
ServiceStartupDisabled = "Deaktiviert"
ServiceStartFailed = "Der Dienst konnte nicht gestartet werden."
ServiceStopFailed = "Der Dienst konnte nicht beendet werden."
ServicePauseFailed = "Der Dienst konnte nicht angehalten werden."
ServiceContinueFailed = "Der Dienst konnte nicht fortgesetzt werden."
ServiceStateUnchanged = "Der Dienst hat den angeforderten Zustand nicht erreicht."
ServiceProcessPid = "PID"
DisconnectStatusHelp = "Trennt die ausgewaehlte Benutzersitzung"
Expand Down Expand Up @@ -364,6 +368,8 @@ IDM_TASK_TILEVERT = "Tiles the windows vertically on the desktop"
IDM_TASK_BRINGTOFRONT = "Brings the window front, but does not switch to it"
IDM_SERVICE_START = "Startet den ausgewählten Dienst"
IDM_SERVICE_STOP = "Beendet den ausgewählten Dienst"
IDM_SERVICE_PAUSE = "Hält den ausgewählten Dienst an"
IDM_SERVICE_CONTINUE = "Setzt den ausgewählten Dienst fort"
IDM_SERVICE_GOTOPROCESS = "Wählt den Prozess des Diensts auf der Seite Prozesse aus"
IDM_PROC_TREE = "Gruppiert Prozesse unter dem übergeordneten Prozess, der sie erstellt hat"
IDM_PROC_EXPAND = "Zeigt die untergeordneten Prozesse der Auswahl"
Expand Down
6 changes: 6 additions & 0 deletions localization/en_us.toml
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,8 @@ ServicesPageTitle = "Services"
ServicesMenu = "&Services"
ServiceStart = "&Start"
ServiceStop = "&Stop"
ServicePause = "&Pause"
ServiceContinue = "&Continue"
ServiceColumnName = "Name"
ServiceColumnDescription = "Description"
ServiceColumnStartupType = "Startup Type"
Expand All @@ -332,6 +334,8 @@ ServiceStartupManual = "Manual"
ServiceStartupDisabled = "Disabled"
ServiceStartFailed = "Unable to start the service."
ServiceStopFailed = "Unable to stop the service."
ServicePauseFailed = "Unable to pause the service."
ServiceContinueFailed = "Unable to continue the service."
ServiceStateUnchanged = "The service did not enter the requested state."
ServiceProcessPid = "PID"
DisconnectStatusHelp = "Disconnects the selected user session"
Expand Down Expand Up @@ -371,6 +375,8 @@ IDM_TASK_TILEVERT = "Tiles the windows vertically on the desktop"
IDM_TASK_BRINGTOFRONT = "Brings the window front, but does not switch to it"
IDM_SERVICE_START = "Starts the selected service"
IDM_SERVICE_STOP = "Stops the selected service"
IDM_SERVICE_PAUSE = "Pauses the selected service"
IDM_SERVICE_CONTINUE = "Continues the selected service"
IDM_SERVICE_GOTOPROCESS = "Selects the service process on the Processes page"
IDM_PROC_TREE = "Groups processes under the parent that created them"
IDM_PROC_EXPAND = "Shows the child processes of the selection"
Expand Down
6 changes: 6 additions & 0 deletions localization/es.toml
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,8 @@ ServicesPageTitle = "Servicios"
ServicesMenu = "&Servicios"
ServiceStart = "&Iniciar"
ServiceStop = "&Detener"
ServicePause = "&Pausar"
ServiceContinue = "&Continuar"
ServiceColumnName = "Nombre"
ServiceColumnDescription = "Descripción"
ServiceColumnStartupType = "Tipo de inicio"
Expand All @@ -325,6 +327,8 @@ ServiceStartupManual = "Manual"
ServiceStartupDisabled = "Deshabilitado"
ServiceStartFailed = "No se pudo iniciar el servicio."
ServiceStopFailed = "No se pudo detener el servicio."
ServicePauseFailed = "No se pudo pausar el servicio."
ServiceContinueFailed = "No se pudo continuar el servicio."
ServiceStateUnchanged = "El servicio no entró en el estado solicitado."
ServiceProcessPid = "PID"
DisconnectStatusHelp = "Desconecta la sesión del usuario seleccionado"
Expand Down Expand Up @@ -364,6 +368,8 @@ IDM_TASK_TILEVERT = "Tiles the windows vertically on the desktop"
IDM_TASK_BRINGTOFRONT = "Brings the window front, but does not switch to it"
IDM_SERVICE_START = "Inicia el servicio seleccionado"
IDM_SERVICE_STOP = "Detiene el servicio seleccionado"
IDM_SERVICE_PAUSE = "Pausa el servicio seleccionado"
IDM_SERVICE_CONTINUE = "Continúa el servicio seleccionado"
IDM_SERVICE_GOTOPROCESS = "Selecciona el proceso del servicio en la página Procesos"
IDM_PROC_TREE = "Agrupa los procesos bajo el proceso primario que los creó"
IDM_PROC_EXPAND = "Muestra los procesos secundarios de la selección"
Expand Down
6 changes: 6 additions & 0 deletions localization/fr.toml
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,8 @@ ServicesPageTitle = "Services"
ServicesMenu = "&Services"
ServiceStart = "&Démarrer"
ServiceStop = "&Arrêter"
ServicePause = "&Suspendre"
ServiceContinue = "&Continuer"
ServiceColumnName = "Nom"
ServiceColumnDescription = "Description"
ServiceColumnStartupType = "Type de démarrage"
Expand All @@ -325,6 +327,8 @@ ServiceStartupManual = "Manuel"
ServiceStartupDisabled = "Désactivé"
ServiceStartFailed = "Impossible de démarrer le service."
ServiceStopFailed = "Impossible d'arrêter le service."
ServicePauseFailed = "Impossible de suspendre le service."
ServiceContinueFailed = "Impossible de continuer le service."
ServiceStateUnchanged = "Le service n'a pas atteint l'état demandé."
ServiceProcessPid = "PID"
DisconnectStatusHelp = "Déconnecte la session de l'utilisateur sélectionné"
Expand Down Expand Up @@ -364,6 +368,8 @@ IDM_TASK_TILEVERT = "Tiles the windows vertically on the desktop"
IDM_TASK_BRINGTOFRONT = "Brings the window front, but does not switch to it"
IDM_SERVICE_START = "Démarre le service sélectionné"
IDM_SERVICE_STOP = "Arrête le service sélectionné"
IDM_SERVICE_PAUSE = "Suspend le service sélectionné"
IDM_SERVICE_CONTINUE = "Reprend le service sélectionné"
IDM_SERVICE_GOTOPROCESS = "Sélectionne le processus du service dans la page Processus"
IDM_PROC_TREE = "Regroupe les processus sous le parent qui les a créés"
IDM_PROC_EXPAND = "Affiche les processus enfants de la sélection"
Expand Down
6 changes: 6 additions & 0 deletions localization/pt.toml
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,8 @@ ServicesPageTitle = "Serviços"
ServicesMenu = "&Serviços"
ServiceStart = "&Iniciar"
ServiceStop = "&Parar"
ServicePause = "&Pausar"
ServiceContinue = "&Continuar"
ServiceColumnName = "Nome"
ServiceColumnDescription = "Descrição"
ServiceColumnStartupType = "Tipo de inicialização"
Expand All @@ -325,6 +327,8 @@ ServiceStartupManual = "Manual"
ServiceStartupDisabled = "Desativado"
ServiceStartFailed = "Não foi possível iniciar o serviço."
ServiceStopFailed = "Não foi possível parar o serviço."
ServicePauseFailed = "Não foi possível pausar o serviço."
ServiceContinueFailed = "Não foi possível continuar o serviço."
ServiceStateUnchanged = "O serviço não entrou no estado solicitado."
ServiceProcessPid = "PID"
DisconnectStatusHelp = "Desconecta a sessão do usuário selecionado"
Expand Down Expand Up @@ -364,6 +368,8 @@ IDM_TASK_TILEVERT = "Tiles the windows vertically on the desktop"
IDM_TASK_BRINGTOFRONT = "Brings the window front, but does not switch to it"
IDM_SERVICE_START = "Inicia o serviço selecionado"
IDM_SERVICE_STOP = "Para o serviço selecionado"
IDM_SERVICE_PAUSE = "Pausa o serviço selecionado"
IDM_SERVICE_CONTINUE = "Continua o serviço selecionado"
IDM_SERVICE_GOTOPROCESS = "Seleciona o processo do serviço na página Processos"
IDM_PROC_TREE = "Agrupa os processos sob o processo pai que os criou"
IDM_PROC_EXPAND = "Mostra os processos filhos da seleção"
Expand Down
6 changes: 6 additions & 0 deletions localization/ru.toml
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,8 @@ ServicesPageTitle = "Службы"
ServicesMenu = "&Службы"
ServiceStart = "&Запустить"
ServiceStop = "&Остановить"
ServicePause = "&Приостановить"
ServiceContinue = "&Продолжить"
ServiceColumnName = "Имя"
ServiceColumnDescription = "Описание"
ServiceColumnStartupType = "Тип запуска"
Expand All @@ -325,6 +327,8 @@ ServiceStartupManual = "Вручную"
ServiceStartupDisabled = "Отключена"
ServiceStartFailed = "Не удалось запустить службу."
ServiceStopFailed = "Не удалось остановить службу."
ServicePauseFailed = "Не удалось приостановить службу."
ServiceContinueFailed = "Не удалось возобновить службу."
ServiceStateUnchanged = "Служба не перешла в запрошенное состояние."
ServiceProcessPid = "PID"
DisconnectStatusHelp = "Отключает выбранный сеанс пользователя"
Expand Down Expand Up @@ -364,6 +368,8 @@ IDM_TASK_TILEVERT = "Tiles the windows vertically on the desktop"
IDM_TASK_BRINGTOFRONT = "Brings the window front, but does not switch to it"
IDM_SERVICE_START = "Запускает выбранную службу"
IDM_SERVICE_STOP = "Останавливает выбранную службу"
IDM_SERVICE_PAUSE = "Приостанавливает выбранную службу"
IDM_SERVICE_CONTINUE = "Возобновляет выбранную службу"
IDM_SERVICE_GOTOPROCESS = "Выбирает процесс службы на странице процессов"
IDM_PROC_TREE = "Группирует процессы под родительским процессом, который их создал"
IDM_PROC_EXPAND = "Показывает дочерние процессы выбранного элемента"
Expand Down
6 changes: 6 additions & 0 deletions localization/zh_cn.toml
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,8 @@ ServicesPageTitle = "服务"
ServicesMenu = "服务(&S)"
ServiceStart = "启动(&S)"
ServiceStop = "停止(&T)"
ServicePause = "暂停(&P)"
ServiceContinue = "继续(&C)"
ServiceColumnName = "名称"
ServiceColumnDescription = "描述"
ServiceColumnStartupType = "启动类型"
Expand All @@ -322,6 +324,8 @@ ServiceStartupManual = "手动"
ServiceStartupDisabled = "禁用"
ServiceStartFailed = "无法启动该服务。"
ServiceStopFailed = "无法停止该服务。"
ServicePauseFailed = "无法暂停该服务。"
ServiceContinueFailed = "无法继续该服务。"
ServiceStateUnchanged = "该服务没有进入请求的状态。"
ServiceProcessPid = "PID"
DisconnectStatusHelp = "断开所选用户会话"
Expand Down Expand Up @@ -361,6 +365,8 @@ IDM_TASK_TILEVERT = "Tiles the windows vertically on the desktop"
IDM_TASK_BRINGTOFRONT = "Brings the window front, but does not switch to it"
IDM_SERVICE_START = "启动所选服务"
IDM_SERVICE_STOP = "停止所选服务"
IDM_SERVICE_PAUSE = "暂停所选服务"
IDM_SERVICE_CONTINUE = "继续所选服务"
IDM_SERVICE_GOTOPROCESS = "在进程页选中该服务的进程"
IDM_PROC_TREE = "按创建该进程的父进程分组显示"
IDM_PROC_EXPAND = "显示所选进程的子进程"
Expand Down
6 changes: 6 additions & 0 deletions localization/zh_tw.toml
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,8 @@ ServicesPageTitle = "服務"
ServicesMenu = "服務(&S)"
ServiceStart = "啟動(&S)"
ServiceStop = "停止(&T)"
ServicePause = "暫停(&P)"
ServiceContinue = "繼續(&C)"
ServiceColumnName = "名稱"
ServiceColumnDescription = "描述"
ServiceColumnStartupType = "啟動類型"
Expand All @@ -322,6 +324,8 @@ ServiceStartupManual = "手動"
ServiceStartupDisabled = "已停用"
ServiceStartFailed = "無法啟動服務。"
ServiceStopFailed = "無法停止服務。"
ServicePauseFailed = "無法暫停服務。"
ServiceContinueFailed = "無法繼續服務。"
ServiceStateUnchanged = "服務沒有進入要求的狀態。"
ServiceProcessPid = "PID"
DisconnectStatusHelp = "中斷選取的使用者工作階段"
Expand Down Expand Up @@ -361,6 +365,8 @@ IDM_TASK_TILEVERT = "Tiles the windows vertically on the desktop"
IDM_TASK_BRINGTOFRONT = "Brings the window front, but does not switch to it"
IDM_SERVICE_START = "啟動選取的服務"
IDM_SERVICE_STOP = "停止選取的服務"
IDM_SERVICE_PAUSE = "暫停選取的服務"
IDM_SERVICE_CONTINUE = "繼續選取的服務"
IDM_SERVICE_GOTOPROCESS = "在處理程序頁選取該服務的處理程序"
IDM_PROC_TREE = "依建立該處理程序的父處理程序分組顯示"
IDM_PROC_EXPAND = "顯示選取處理程序的子處理程序"
Expand Down
8 changes: 7 additions & 1 deletion src/app/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1178,6 +1178,8 @@ impl App {
.unwrap_or_default();
self.enable_menu_item(menu, IDM_SERVICE_START, commands.start);
self.enable_menu_item(menu, IDM_SERVICE_STOP, commands.stop);
self.enable_menu_item(menu, IDM_SERVICE_PAUSE, commands.pause);
self.enable_menu_item(menu, IDM_SERVICE_CONTINUE, commands.continue_service);
self.enable_menu_item(menu, IDM_SERVICE_GOTOPROCESS, commands.go_to_process);
}
if self.options.current_page == PageId::Processes.persisted() {
Expand Down Expand Up @@ -2288,7 +2290,11 @@ impl App {
MessageBeep(0);
}
}
IDM_SERVICE_START | IDM_SERVICE_STOP | IDM_SERVICE_GOTOPROCESS => {
IDM_SERVICE_START
| IDM_SERVICE_STOP
| IDM_SERVICE_PAUSE
| IDM_SERVICE_CONTINUE
| IDM_SERVICE_GOTOPROCESS => {
if self.options.current_page == PageId::Services.persisted() {
let handled =
self.pages[PageId::Services.index()].handle_service_command(command_id);
Expand Down
25 changes: 22 additions & 3 deletions src/pages/services/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
mod model;
mod sampler;

// 服务页列出本机 Win32 服务,并在后台 worker 上启动或停止服务。
// 服务页列出本机 Win32 服务,并在后台 worker 上启动、停止、暂停或继续服务。
// UI 线程只提交请求、维护列表选择和绘制。刷新保留服务名对应的选择、焦点和滚动位置。
// “转到进程”只使用带创建时间的 ProcIdentity;没有校验过的进程时该命令保持禁用。

Expand Down Expand Up @@ -47,8 +47,9 @@ use crate::system::process_identity::{FindProcPayload, ProcIdentity, find_proc_l
use crate::ui::localization::{TextKey, service_column_titles, text};
use crate::ui::menus::build_popup_menu;
use crate::ui::resource_ids::{
IDC_SERVICELIST, IDM_SERVICE_GOTOPROCESS, IDM_SERVICE_START, IDM_SERVICE_STOP,
IDR_SERVICE_CONTEXT, PWM_SERVICE_WORKER_COMPLETE, WM_FINDPROC,
IDC_SERVICELIST, IDM_SERVICE_CONTINUE, IDM_SERVICE_GOTOPROCESS, IDM_SERVICE_PAUSE,
IDM_SERVICE_START, IDM_SERVICE_STOP, IDR_SERVICE_CONTEXT, PWM_SERVICE_WORKER_COMPLETE,
WM_FINDPROC,
};

pub(crate) use self::model::ServiceCommandState;
Expand Down Expand Up @@ -174,6 +175,14 @@ impl ServicePageState {
self.request_control(ServiceControlAction::Stop);
true
}
IDM_SERVICE_PAUSE => {
self.request_control(ServiceControlAction::Pause);
true
}
IDM_SERVICE_CONTINUE => {
self.request_control(ServiceControlAction::Continue);
true
}
IDM_SERVICE_GOTOPROCESS => {
self.go_to_process();
true
Expand Down Expand Up @@ -249,6 +258,8 @@ impl ServicePageState {
unsafe {
enable_command(popup.as_raw(), IDM_SERVICE_START, state.start);
enable_command(popup.as_raw(), IDM_SERVICE_STOP, state.stop);
enable_command(popup.as_raw(), IDM_SERVICE_PAUSE, state.pause);
enable_command(popup.as_raw(), IDM_SERVICE_CONTINUE, state.continue_service);
enable_command(popup.as_raw(), IDM_SERVICE_GOTOPROCESS, state.go_to_process);
let command = TrackPopupMenuEx(
popup.as_raw(),
Expand Down Expand Up @@ -301,6 +312,8 @@ impl ServicePageState {
for control_id in [
i32::from(IDM_SERVICE_START),
i32::from(IDM_SERVICE_STOP),
i32::from(IDM_SERVICE_PAUSE),
i32::from(IDM_SERVICE_CONTINUE),
i32::from(IDM_SERVICE_GOTOPROCESS),
] {
let control = GetDlgItem(self.hwnd, control_id);
Expand Down Expand Up @@ -350,6 +363,8 @@ impl ServicePageState {
let allowed = match action {
ServiceControlAction::Start => state.start,
ServiceControlAction::Stop => state.stop,
ServiceControlAction::Pause => state.pause,
ServiceControlAction::Continue => state.continue_service,
};
let Some(service_name) = self.selected_service.clone() else {
self.beep();
Expand Down Expand Up @@ -603,6 +618,8 @@ impl ServicePageState {
let state = self.command_state();
enable_button(self.hwnd, IDM_SERVICE_START, state.start);
enable_button(self.hwnd, IDM_SERVICE_STOP, state.stop);
enable_button(self.hwnd, IDM_SERVICE_PAUSE, state.pause);
enable_button(self.hwnd, IDM_SERVICE_CONTINUE, state.continue_service);
enable_button(self.hwnd, IDM_SERVICE_GOTOPROCESS, state.go_to_process);
}

Expand Down Expand Up @@ -639,6 +656,8 @@ impl ServicePageState {
let summary = match action {
ServiceControlAction::Start => text(TextKey::ServiceStartFailed),
ServiceControlAction::Stop => text(TextKey::ServiceStopFailed),
ServiceControlAction::Pause => text(TextKey::ServicePauseFailed),
ServiceControlAction::Continue => text(TextKey::ServiceContinueFailed),
};
let body = match failure {
ServiceActionFailure::Api(code) => {
Expand Down
Loading