mirror of
https://github.com/dobin/detonator
synced 2026-08-09 12:31:13 +00:00
26 lines
792 B
PowerShell
26 lines
792 B
PowerShell
# RedEdr Download & Extract
|
|
|
|
$zipUrl = "https://detonator1.blob.core.windows.net/scripts/rededr.zip"
|
|
|
|
# Kill existing RedEdr (or we cant overwrite RedEdr.exe)
|
|
Stop-Process -Name "RedEdr" -Force
|
|
|
|
# Stop the RedEdr PPL (or we cant overwrite RedEdrPplService.exe)
|
|
C:\RedEdr\RedEdr.exe --pplstop
|
|
|
|
# Remove the Kernel driver (or we cant overwrite RedEdrDriver.sys)
|
|
C:\RedEdr\RedEdr.exe --krnunload
|
|
|
|
$zipPath = "C:\RedEdr\rededr_download.zip"
|
|
$extractPath = "C:\RedEdr"
|
|
|
|
# Create the destination directory if it doesn't exist
|
|
if (-Not (Test-Path -Path $extractPath)) {
|
|
New-Item -ItemType Directory -Path $extractPath -Force
|
|
}
|
|
|
|
# Download, unzip, delete zip
|
|
Invoke-WebRequest -Uri $zipUrl -OutFile $zipPath
|
|
Expand-Archive -Path $zipPath -DestinationPath $extractPath -Force
|
|
Remove-Item $zipPath
|