refactor(installer): rename StopWorkerStep.TaskName to LegacyTaskName
The schtasks delete is now only legacy-migration cleanup; current installs autostart via a Startup-folder shortcut. Clarifies the constant and comment. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -34,9 +34,10 @@ public sealed class UninstallRunner
|
|||||||
$"Cannot uninstall: worker did not stop cleanly. {stopResult.ErrorMessage} " +
|
$"Cannot uninstall: worker did not stop cleanly. {stopResult.ErrorMessage} " +
|
||||||
"Kill the worker manually and re-run uninstall.");
|
"Kill the worker manually and re-run uninstall.");
|
||||||
|
|
||||||
// 3) Unregister the autostart task, and best-effort remove any legacy service.
|
// 3) Best-effort removal of the legacy scheduled task and Windows service
|
||||||
progress.Report("Removing autostart task...");
|
// (older installs; current installs autostart via a Startup-folder shortcut).
|
||||||
await ProcessRunner.RunAsync("schtasks.exe", $"/Delete /TN \"{StopWorkerStep.TaskName}\" /F", null, progress, ct);
|
progress.Report("Removing legacy autostart task...");
|
||||||
|
await ProcessRunner.RunAsync("schtasks.exe", $"/Delete /TN \"{StopWorkerStep.LegacyTaskName}\" /F", null, progress, ct);
|
||||||
await ProcessRunner.RunAsync("sc.exe", "delete ClaudeDoWorker", null, progress, ct);
|
await ProcessRunner.RunAsync("sc.exe", "delete ClaudeDoWorker", null, progress, ct);
|
||||||
|
|
||||||
// 3b) Remove Apps & Features registry entry (best-effort).
|
// 3b) Remove Apps & Features registry entry (best-effort).
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ namespace ClaudeDo.Installer.Steps;
|
|||||||
|
|
||||||
public sealed class StopWorkerStep : IInstallStep
|
public sealed class StopWorkerStep : IInstallStep
|
||||||
{
|
{
|
||||||
public const string TaskName = "ClaudeDoWorker";
|
public const string LegacyTaskName = "ClaudeDoWorker";
|
||||||
public const string ProcessName = "ClaudeDo.Worker";
|
public const string ProcessName = "ClaudeDo.Worker";
|
||||||
|
|
||||||
public string Name => "Stop Worker";
|
public string Name => "Stop Worker";
|
||||||
|
|||||||
Reference in New Issue
Block a user