diff --git a/register-uninstall.ps1 b/register-uninstall.ps1 new file mode 100644 index 0000000..26b1e8b --- /dev/null +++ b/register-uninstall.ps1 @@ -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' diff --git a/uninstall.vbs b/uninstall.vbs new file mode 100644 index 0000000..ca458a2 --- /dev/null +++ b/uninstall.vbs @@ -0,0 +1,33 @@ +' DeepSeek Harness uninstaller (silent) +' Invoked from Windows Apps & Features via UninstallString +Set ws = CreateObject("WScript.Shell") +Set fso = CreateObject("Scripting.FileSystemObject") + +' 1. stop app and backend service +ws.Run "taskkill /F /IM dsh-app.exe /T", 0, True +ws.Run "taskkill /F /IM node.exe /T", 0, True + +' 2. remove autostart registry entry +On Error Resume Next +ws.RegDelete "HKCU\Software\Microsoft\Windows\CurrentVersion\Run\DeepSeekHarnessService" +Err.Clear + +' 3. remove desktop shortcuts +Dim desktop +desktop = ws.SpecialFolders("Desktop") +On Error Resume Next +If fso.FileExists(desktop & "\DeepSeek Harness.lnk") Then fso.DeleteFile desktop & "\DeepSeek Harness.lnk" +If fso.FileExists("C:\Users\VanuSystems-Mu\DeskBox\AI\DeepSeek Harness.lnk") Then fso.DeleteFile "C:\Users\VanuSystems-Mu\DeskBox\AI\DeepSeek Harness.lnk" +Err.Clear + +' 4. remove uninstall registry key +On Error Resume Next +ws.RegDelete "HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall\DeepSeekHarness" +Err.Clear + +' 5. remove install directory +On Error Resume Next +Dim installDir +installDir = ws.ExpandEnvironmentStrings("%LOCALAPPDATA%\DeepSeekHarness") +If fso.FolderExists(installDir) Then fso.DeleteFolder installDir, True +Err.Clear