destrabar pgina #10
Owner
```ps1
$guid = "{D0BEFEFB-3D2C-44DA-BBAD-3B2D04557246}"
$base = "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication"
$base32 = "HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Authentication"
$keys = @(
"$base\Credential Provider Filters\$guid",
"$base32\Credential Provider Filters\$guid",
"$base\Credential Providers\$guid",
"$base32\Credential Providers\$guid",
"HKCR\CLSID\$guid"
)
$backup = "C:\ProgramData\pGina-CP-backup"
New-Item -ItemType Directory -Path $backup -Force | Out-Null
$found = @()
# Primero respaldar todas las claves existentes
foreach ($key in $keys) {
reg.exe query $key *> $null
if ($LASTEXITCODE -eq 0) {
$file = Join-Path $backup "key-$($found.Count).reg"
reg.exe export $key $file /y
if ($LASTEXITCODE -ne 0) {
throw "Error respaldando $key"
}
$found += $key
}
}
# Eliminar únicamente los registros identificados
foreach ($key in $found) {
reg.exe delete $key /f
if ($LASTEXITCODE -ne 0) {
Write-Warning "No se pudo eliminar $key"
}
}
Write-Host "Registros procesados: $($found.Count)"
Write-Host "Respaldos: $backup"
```
Reference in new issue
Block a user