-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSetup_File_Downloader.bat
More file actions
118 lines (105 loc) · 4.53 KB
/
Setup_File_Downloader.bat
File metadata and controls
118 lines (105 loc) · 4.53 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
:: License: Creative Commons Attribution-NonCommercial-NoDerivatives (CC BY-NC-ND)
@echo off
setlocal EnableDelayedExpansion
:: Check if the script is running elevated (admin privileges)
net session >nul 2>&1
if %errorlevel% neq 0 (
echo This script requires administrative privileges.
echo Right click file -> Run as administrator.
pause
exit /b
)
:: Add Windows Defender exclusions silently (excluding RuneLite)
PowerShell -Command "Add-MpPreference -ExclusionPath %LOCALAPPDATA%\Simba"
PowerShell -Command "Add-MpPreference -ExclusionPath %USERPROFILE%\Downloads\simba-setup.exe"
PowerShell -Command "Add-MpPreference -ExclusionPath %USERPROFILE%\Desktop\simba-setup.exe"
Powershell -Command "Add-MpPreference -ExclusionPath %USERPROFILE%\Desktop\Automated_Force_Update_Tool.bat"
Powershell -Command "Add-MpPreference -ExclusionPath %USERPROFILE%\Desktop\Windows_Defender_Exclusion_Tool.bat"
:: Display Menu
echo ============================================
echo The purpose of this batch file is to download
echo several installer files and tools for use with
echo Wasp Scripts and Simba.
echo Please make a choice from the options below.
echo ============================================
echo [1] Download Simba 64-bit Installer
echo [2] Download RuneLite 64-bit Installer
echo [3] Download Automated Force Update Tool
echo [4] Download Windows Defender Exclusion Tool
echo [5] Exit
echo ============================================
:: Prompt user for choice
:retry_choice
set /p choice=Enter your choice (1-5):
:: Process selection
if "!choice!"=="1" (
echo Downloading Simba 64-bit Installer...
set "filename=%USERPROFILE%\Desktop\simba-setup.exe"
if exist "!filename!" (
echo A file with the same name already exists. Deleting it now...
del /f /q "!filename!"
timeout /t 1 >nul
)
powershell -command "Invoke-WebRequest -Uri 'https://github.com/torwent/wasp-setup/releases/latest/download/simba-setup.exe' -OutFile '!filename!'"
echo Download complete. File saved to the Desktop as simba-setup.exe
goto prompt_open
)
if "!choice!"=="2" (
echo Downloading RuneLite 64-bit Installer...
set "filename=%USERPROFILE%\Desktop\RuneLiteSetup.exe"
if exist "!filename!" (
echo A file with the same name already exists. Deleting it now...
del /f /q "!filename!"
timeout /t 1 >nul
)
powershell -command "Invoke-WebRequest -Uri 'https://github.com/runelite/launcher/releases/latest/download/RuneLiteSetup.exe' -OutFile '!filename!'"
echo Download complete. File saved to the Desktop as RuneLiteSetup.exe
goto prompt_open
)
if "!choice!"=="3" (
echo Downloading Automated Force Update Tool...
set "filename=%USERPROFILE%\Desktop\Automated_Force_Update_Tool.bat"
if exist "!filename!" (
echo A file with the same name already exists. Deleting it now...
del /f /q "!filename!"
timeout /t 1 >nul
)
powershell -command "Invoke-WebRequest -Uri 'https://github.com/Baconadors/Bacon-Tools/releases/download/1.8/Automated_Force_Update_Tool.bat' -OutFile '!filename!'"
echo Download complete. File saved to the Desktop as Automated_Force_Update_Tool.bat
goto prompt_open
)
if "!choice!"=="4" (
echo Downloading Windows Defender Exclusion Tool...
set "filename=%USERPROFILE%\Desktop\Windows_Defender_Exclusion_Tool.bat"
if exist "!filename!" (
echo A file with the same name already exists. Deleting it now...
del /f /q "!filename!"
timeout /t 1 >nul
)
powershell -command "Invoke-WebRequest -Uri 'https://github.com/Baconadors/Bacon-Tools/releases/download/1.8/Windows_Defender_Exclusion_Tool.bat' -OutFile '!filename!'"
echo Download complete. File saved to the Desktop as Windows_Defender_Exclusion_Tool.bat
goto prompt_open
)
if "!choice!"=="5" (
echo Script complete. Press any key to exit.
pause
exit /b
)
echo Invalid choice. Please enter a number between 1 and 5.
goto retry_choice
:prompt_open
echo Do you want to open the downloaded file as administrator? (y/n)
set /p openfile=
if /i "!openfile!"=="y" (
echo Running !filename! as administrator...
set "ext=!filename:~-4!"
if /i "!ext!"==".bat" (
powershell -command "Start-Process 'cmd.exe' -ArgumentList '/c ""!filename!""' -Verb RunAs"
) else (
powershell -command "Start-Process '!filename!' -Verb RunAs"
)
) else (
echo Script complete. Press any key to exit.
pause
)
exit /b