FUA/patcher/windows/uninstall_crack.ps1

45 lines
1.4 KiB
PowerShell

# Maya License Crack Uninstaller - Windows PowerShell
Write-Host "========================================" -ForegroundColor Cyan
Write-Host "Maya License Crack Uninstaller (Windows)" -ForegroundColor Cyan
Write-Host "========================================" -ForegroundColor Cyan
Write-Host ""
# Find Maya installation
$MayaPath = $null
$MayaVersions = Get-ChildItem "C:\Program Files\Autodesk\" -Filter "Maya*" -Directory | Sort-Object Name -Descending
foreach ($Version in $MayaVersions) {
$TestPath = Join-Path $Version.FullName "bin\maya.exe"
if (Test-Path $TestPath) {
$MayaPath = $TestPath
break
}
}
if (-not $MayaPath) {
Write-Host "ERROR: Maya not found!" -ForegroundColor Red
Read-Host "Press Enter to exit"
exit 1
}
$MayaBackup = "$MayaPath.original"
if (-not (Test-Path $MayaBackup)) {
Write-Host "WARNING: No backup found" -ForegroundColor Yellow
Write-Host "The crack may not be installed"
Read-Host "Press Enter to exit"
exit 0
}
Write-Host "Restoring original maya.exe..." -ForegroundColor Yellow
Move-Item $MayaBackup $MayaPath -Force
Write-Host ""
Write-Host "========================================" -ForegroundColor Cyan
Write-Host "Uninstallation Complete!" -ForegroundColor Green
Write-Host "========================================" -ForegroundColor Cyan
Write-Host ""
Write-Host "Maya has been restored to its original state."
Write-Host ""
Read-Host "Press Enter to exit"