$ErrorActionPreference = 'Stop'

$installRoot = Join-Path $env:LOCALAPPDATA 'Zulang\ZhulangApp'
$desktopShortcut = Join-Path ([Environment]::GetFolderPath('Desktop')) 'Zhulang Local AI Platform.lnk'
$startMenu = Join-Path ([Environment]::GetFolderPath('Programs')) 'Zhulang'

Remove-Item -LiteralPath $desktopShortcut -Force -ErrorAction SilentlyContinue
Remove-Item -LiteralPath $startMenu -Recurse -Force -ErrorAction SilentlyContinue
Remove-Item -LiteralPath $installRoot -Recurse -Force -ErrorAction SilentlyContinue

Write-Host 'Zhulang Local AI Platform uninstalled.'
