-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuninstall.ps1
More file actions
38 lines (35 loc) · 1.39 KB
/
uninstall.ps1
File metadata and controls
38 lines (35 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# previously gener8d by chatgpt
$Url = "https://bjuonday.github.io/otgithub/assets/application_default.xml"
$OutputFile = "C:\Games\OldTanks Online\META-INF\AIR\application.xml"
$Cache = "$env:USERPROFILE\AppData\Roaming\OldTanksOnline.Client.Standalone\Local Store\cache"
$resourceCache = "$env:USERPROFILE\AppData\Roaming\OldTanksOnline.Client.Standalone\Local Store\#SharedObjects\StandaloneLoader.swf\resourceCache.sol"
Clear-Host
Write-Host ""
if (Get-Process -Name "OTOnline" -ErrorAction SilentlyContinue) {
Stop-Process -Name "OTOnline" -Force
Write-Host "[+] Closed OTOnline process..."
} else {
Write-Host "[+] Already closed OTOnline process..."
}
Sleep -Seconds 2
Write-Host ""
$dir = Split-Path $OutputFile
if (!(Test-Path $dir)) {
New-Item -ItemType Directory -Path $dir -Force | Out-Null
}
try {
if ((Test-Path $Cache)) {
Remove-Item $Cache -Recurse
}
if ((Test-Path $resourceCache)) {
Remove-Item $resourceCache
}
Invoke-WebRequest -Uri $Url -OutFile $OutputFile -UseBasicParsing
Clear-Host
Write-Host "[V] Returned back to default textures"
}
catch {
Write-Host "[X] Error: $($_.Exception.Message)"
}
Clear-Host
break