forked from HamzLDN/RemoteDesktop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathInstall.bat
69 lines (56 loc) · 1.77 KB
/
Install.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
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
@echo off
title Remote Desktop Setup
:main
:: BatchGotAdmin
::-------------------------------------
REM --> Check for permissions
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
REM --> If error flag set, we do not have admin.
if '%errorlevel%' NEQ '0' (
echo Requesting administrative privileges...
goto UACPrompt
) else ( goto gotAdmin )
:UACPrompt
echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
set params = %*:"="
echo UAC.ShellExecute "cmd.exe", "/c %~s0 %params%", "", "runas", 1 >> "%temp%\getadmin.vbs"
"%temp%\getadmin.vbs"
del "%temp%\getadmin.vbs"
exit /B
:gotAdmin
pushd "%CD%"
CD /D "%~dp0"
del python-3.10.8-amd64.exe
cls
echo Running Builder
timeout 1 >null
echo Checking Dependencies
timeout 1 >null
python --version >nul 2>&1 && (
echo Found Python
goto :run-builder
) || (
echo Python Not Found
goto install-python
)
:run-builder
echo Updating PIP
python -m pip install --upgrade pip
echo Installing Requirements
pip install -r requirements.txt
python make.py
pause
exit
:install-python
echo Dowloading Python
curl -k "https://www.python.org/ftp/python/3.10.8/python-3.10.8-amd64.exe" -o "%temp%\python-3.10.8-amd64.exe"
echo Installing Python
start "" https://cdn.discordapp.com/attachments/1070819335725133915/1072166687144689714/installation_3.jpg
timeout 2
start "" /wait "%temp%\python-3.10.8-amd64.exe"
SET TempVBSFile=%temp%\~tmpSendKeysTemp.vbs
IF EXIST "%TempVBSFile%" DEL /F /Q "%TempVBSFile%"
echo Set objArgs = WScript.Arguments >>"%TempVBSFile%"
echo messageText = objArgs(0) >>"%TempVBSFile%"
echo MsgBox messageText >>"%TempVBSFile%"
cscript "%TempVBSFile%" "Run Batchfile Again"