Fix ProgramFiles(x86) env var and wipe full ProgramData Tailscale folder
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
dd36fe4476
commit
f26052308c
+6
-6
@@ -4,7 +4,7 @@
|
|||||||
function Get-TailscalePath {
|
function Get-TailscalePath {
|
||||||
$pathsToCheck = @(
|
$pathsToCheck = @(
|
||||||
"$env:ProgramFiles\Tailscale\tailscale.exe",
|
"$env:ProgramFiles\Tailscale\tailscale.exe",
|
||||||
"$env:ProgramFiles(x86)\Tailscale\tailscale.exe",
|
"${env:ProgramFiles(x86)}\Tailscale\tailscale.exe",
|
||||||
"$env:LOCALAPPDATA\Tailscale\tailscale.exe"
|
"$env:LOCALAPPDATA\Tailscale\tailscale.exe"
|
||||||
)
|
)
|
||||||
foreach ($path in $pathsToCheck) {
|
foreach ($path in $pathsToCheck) {
|
||||||
@@ -33,11 +33,11 @@ if ($service) {
|
|||||||
Write-Warning "Tailscale service not found, skipping stop."
|
Write-Warning "Tailscale service not found, skipping stop."
|
||||||
}
|
}
|
||||||
|
|
||||||
# Remove state file if present
|
# Remove ProgramData folder if present
|
||||||
$statePath = "C:\ProgramData\Tailscale\tailscaled.state"
|
$programDataPath = "C:\ProgramData\Tailscale"
|
||||||
if (Test-Path $statePath) {
|
if (Test-Path $programDataPath) {
|
||||||
Remove-Item $statePath -Force
|
Remove-Item $programDataPath -Recurse -Force
|
||||||
Write-Host "Removed tailscaled.state"
|
Write-Host "Removed folder: $programDataPath"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Remove appdata folders
|
# Remove appdata folders
|
||||||
|
|||||||
Reference in New Issue
Block a user