feat: Windows 应用管理卸载支持

- uninstall.vbs:静默卸载(杀进程、清自启项、删快捷方式、删目录、删注册项)
- register-uninstall.ps1:注册 HKCU Uninstall 项(设置->应用 可卸载)
This commit is contained in:
Reasonix committed 2026-08-14 16:22:23 +08:00
1 parent 0b868418cb
commit 880915bf01
2 files changed
+56

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
# Register DeepSeek Harness in Windows Apps & Features (uninstall entry)
# DisplayName built via [char] codes to avoid file-encoding issues
$ErrorActionPreference = 'Stop'
$key = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Uninstall\DeepSeekHarness'
$install = "$env:LOCALAPPDATA\DeepSeekHarness"
$uninst = "$install\uninstall.vbs"
if (-not (Test-Path $uninst)) { Write-Output "MISSING uninstall.vbs at $uninst"; exit 1 }
# 'DeepSeek Harness ' + 桌面客户端 (U+684C U+9762 U+5BA2 U+6237 U+7AEF)
$name = 'DeepSeek Harness ' + [char]0x684C + [char]0x9762 + [char]0x5BA2 + [char]0x6237 + [char]0x7AEF
New-Item -Path $key -Force | Out-Null
Set-ItemProperty -Path $key -Name 'DisplayName' -Value $name -Type String
Set-ItemProperty -Path $key -Name 'DisplayVersion' -Value '1.0.0' -Type String
Set-ItemProperty -Path $key -Name 'Publisher' -Value 'VanuSystems' -Type String
Set-ItemProperty -Path $key -Name 'InstallLocation' -Value $install -Type String
Set-ItemProperty -Path $key -Name 'DisplayIcon' -Value "$install\dsh.ico" -Type String
Set-ItemProperty -Path $key -Name 'UninstallString' -Value ('"' + "$env:SystemRoot\System32\wscript.exe" + '" "' + $uninst + '"') -Type String
Set-ItemProperty -Path $key -Name 'NoModify' -Value 1 -Type DWord
Set-ItemProperty -Path $key -Name 'NoRepair' -Value 1 -Type DWord
Set-ItemProperty -Path $key -Name 'EstimatedSize' -Value 343000 -Type DWord
Write-Output 'Registered OK'