Skip to content

Commit f684c75

Browse files
author
Your Name
committed
Simplify Windows uninstall: replace manual script with one-liner command
1 parent 453b203 commit f684c75

1 file changed

Lines changed: 2 additions & 18 deletions

File tree

index.html

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1912,31 +1912,15 @@ <h4>
19121912
<path d="M3 6h18M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/>
19131913
</svg>
19141914
</span>
1915-
Windows (PowerShell) - Recommended
1915+
Windows (PowerShell)
19161916
</h4>
1917-
<p>Download and run the uninstall script (handles file locks automatically)</p>
1917+
<p>Completely remove PersistenceAI including binaries, cache, and config files (handles file locks automatically)</p>
19181918
<div class="command">
19191919
iwr -useb https://persistence-ai.github.io/Landing/uninstall.ps1 | iex
19201920
<button class="command-copy" onclick="copyToClipboard('iwr -useb https://persistence-ai.github.io/Landing/uninstall.ps1 | iex', this, 'windows')">Copy</button>
19211921
</div>
19221922
</div>
19231923

1924-
<div class="install-method" style="margin-top: 1rem;">
1925-
<h4>
1926-
<span class="icon">
1927-
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor">
1928-
<path d="M3 6h18M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/>
1929-
</svg>
1930-
</span>
1931-
Windows (PowerShell) - Manual
1932-
</h4>
1933-
<p>Completely remove PersistenceAI including binaries, cache, and config files</p>
1934-
<div class="command">
1935-
# Stop running processes<br>Get-Process | Where-Object { $_.ProcessName -eq &quot;pai&quot; -or $_.ProcessName -eq &quot;persistenceai&quot; } | Stop-Process -Force -ErrorAction SilentlyContinue<br>Start-Sleep -Seconds 2<br># Find all pai/persistenceai installations<br>$installDirs = @()<br>$paiCmd = Get-Command -Name &quot;pai&quot; -ErrorAction SilentlyContinue<br>$persistenceaiCmd = Get-Command -Name &quot;persistenceai&quot; -ErrorAction SilentlyContinue<br>if ($paiCmd) { $installDirs += Split-Path $paiCmd.Source -Parent }<br>if ($persistenceaiCmd) { $installDirs += Split-Path $persistenceaiCmd.Source -Parent }<br>$installDirs = $installDirs | Select-Object -Unique<br># Remove found installation directories<br>foreach ($dir in $installDirs) { if (Test-Path $dir) { Remove-Item -Path $dir -Recurse -Force -ErrorAction SilentlyContinue; Write-Host &quot;Removed: $dir&quot; } }<br># Remove standard directories<br>$dirs = @(&quot;$env:USERPROFILE\.persistenceai&quot;, &quot;$env:USERPROFILE\.pai&quot;, &quot;$env:USERPROFILE\.config\persistenceai&quot;, &quot;$env:USERPROFILE\.config\pai&quot;, &quot;$env:LOCALAPPDATA\persistenceai&quot;, &quot;$env:LOCALAPPDATA\pai&quot;)<br>foreach ($dir in $dirs) { if (Test-Path $dir) { Remove-Item -Path $dir -Recurse -Force -ErrorAction SilentlyContinue } }<br># Remove from PATH (User and System)<br>$userPath = [Environment]::GetEnvironmentVariable(&quot;Path&quot;, &quot;User&quot;)<br>if ($userPath) {<br>&nbsp;&nbsp;$newUserPath = ($userPath -split &quot;;&quot; | Where-Object { $_ -and $_ -notmatch &quot;\.persistenceai&quot; -and $_ -notmatch &quot;\.pai&quot; }) -join &quot;;&quot;<br>&nbsp;&nbsp;[Environment]::SetEnvironmentVariable(&quot;Path&quot;, $newUserPath, &quot;User&quot;)<br>}<br># Update current session PATH<br>$env:Path = ($env:Path -split &quot;;&quot; | Where-Object { $_ -and $_ -notmatch &quot;\.persistenceai&quot; -and $_ -notmatch &quot;\.pai&quot; }) -join &quot;;&quot;<br>Write-Host &quot;PersistenceAI completely uninstalled. Please restart PowerShell for changes to take effect.&quot; -ForegroundColor Green
1936-
<button class="command-copy" onclick="copyToClipboard('# Stop running processes\nGet-Process | Where-Object { $_.ProcessName -eq \'pai\' -or $_.ProcessName -eq \'persistenceai\' } | Stop-Process -Force -ErrorAction SilentlyContinue\nStart-Sleep -Seconds 2\n# Find all pai/persistenceai installations\n$installDirs = @()\n$paiCmd = Get-Command -Name \'pai\' -ErrorAction SilentlyContinue\n$persistenceaiCmd = Get-Command -Name \'persistenceai\' -ErrorAction SilentlyContinue\nif ($paiCmd) { $installDirs += Split-Path $paiCmd.Source -Parent }\nif ($persistenceaiCmd) { $installDirs += Split-Path $persistenceaiCmd.Source -Parent }\n$installDirs = $installDirs | Select-Object -Unique\n# Remove found installation directories\nforeach ($dir in $installDirs) { if (Test-Path $dir) { Remove-Item -Path $dir -Recurse -Force -ErrorAction SilentlyContinue; Write-Host \'Removed: $dir\' } }\n# Remove standard directories\n$dirs = @(\'$env:USERPROFILE\\.persistenceai\', \'$env:USERPROFILE\\.pai\', \'$env:USERPROFILE\\.config\\persistenceai\', \'$env:USERPROFILE\\.config\\pai\', \'$env:LOCALAPPDATA\\persistenceai\', \'$env:LOCALAPPDATA\\pai\')\nforeach ($dir in $dirs) { if (Test-Path $dir) { Remove-Item -Path $dir -Recurse -Force -ErrorAction SilentlyContinue } }\n# Remove from PATH (User and System)\n$userPath = [Environment]::GetEnvironmentVariable(\'Path\', \'User\')\nif ($userPath) {\n $newUserPath = ($userPath -split \';\' | Where-Object { $_ -and $_ -notmatch \'\\.persistenceai\' -and $_ -notmatch \'\\.pai\' }) -join \';\'\n [Environment]::SetEnvironmentVariable(\'Path\', $newUserPath, \'User\')\n}\n# Update current session PATH\n$env:Path = ($env:Path -split \';\' | Where-Object { $_ -and $_ -notmatch \'\\.persistenceai\' -and $_ -notmatch \'\\.pai\' }) -join \';\'\nWrite-Host \'PersistenceAI completely uninstalled. Please restart PowerShell for changes to take effect.\' -ForegroundColor Green', this, 'windows')">Copy</button>
1937-
</div>
1938-
</div>
1939-
19401924
<div class="install-method" style="margin-top: 1rem;">
19411925
<h4>
19421926
<span class="icon">

0 commit comments

Comments
 (0)