Skip to content

Commit

Permalink
Update windows_start.bat
Browse files Browse the repository at this point in the history
  • Loading branch information
sachinsenal0x64 authored Feb 7, 2024
1 parent 82ed7d7 commit 1351dc9
Showing 1 changed file with 34 additions and 9 deletions.
43 changes: 34 additions & 9 deletions windows_start.bat
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@echo off

setlocal

:: BatchGotAdmin
:-------------------------------------
Expand All @@ -10,24 +10,49 @@ REM --> If error flag set, we do not have admin.
if '%errorlevel%' NEQ '0' (
echo Requesting administrative privileges...
goto UACPrompt
) else ( goto gotAdmin )
) else (
goto gotAdmin
)

:UACPrompt
echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\getadmin.vbs"
echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\getadmin.vbs"

"%temp%\getadmin.vbs"
exit /B
"%temp%\getadmin.vbs"
exit /B

:gotAdmin
if exist "%temp%\getadmin.vbs" ( del "%temp%\getadmin.vbs" )
pushd "%CD%"
CD /D "%~dp0"
if exist "%temp%\getadmin.vbs" (
del "%temp%\getadmin.vbs"
)
pushd "%CD%"
CD /D "%~dp0"
goto :eof :: or use 'exit /b'

:--------------------------------------
set SCRIPT="%TEMP%\%RANDOM%-%RANDOM%-%RANDOM%-%RANDOM%.vbs"

:: Define repository URL and clone directory
set "repoURL=https://github.com/sachinsenal0x64/FIXARR"
set "cloneDir=FIXARR"

:: Check if fixarr.py exists
if not exist "%cloneDir%\fixarr.py" (
echo fixarr.py does not exist. Cloning Git repository...
git clone %repoURL% %cloneDir%
)

:: Change to the clone directory
cd /d %cloneDir%

:: Print message and install packages
echo Installing Packages......
pip install -r requirements.txt

:: Run fixarr.py without displaying the console window
set python_path=python
set code_file=fixarr.py
start cmd.exe /k %python_path% %code_file%

endlocal
@REM @CMD.EXE

0 comments on commit 1351dc9

Please sign in to comment.