-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart.bat
More file actions
60 lines (53 loc) · 1.25 KB
/
Copy pathstart.bat
File metadata and controls
60 lines (53 loc) · 1.25 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
@echo off
title IP Lookup
color 0F
:: Check if Python is installed
echo Checking for Python installation...
python --version >nul 2>&1
if errorlevel 1 (
echo [ERROR] Python is not installed or not in PATH.
echo Please install Python from https://python.org
echo Make sure to check "Add Python to PATH" during installation.
pause
exit /b 1
)
echo [OK] Python is installed.
echo.
:: Check if pip is available
echo Checking for pip...
python -m pip --version >nul 2>&1
if errorlevel 1 (
echo [ERROR] pip is not available.
echo Please ensure pip is installed with Python.
pause
exit /b 1
)
echo [OK] pip is available.
echo.
:: Install required packages
echo Installing required packages...
echo.
python -m pip install --quiet --upgrade pip
python -m pip install --quiet requests colorama
if errorlevel 1 (
echo.
echo [ERROR] Failed to install required packages.
pause
exit /b 1
)
echo [OK] All packages installed successfully.
echo.
:: Clear the terminal
cls
:: Run the Python script
python ip-lookup.py
:: Check if the script ran successfully
if errorlevel 1 (
echo.
echo [ERROR] The program encountered an error.
echo.
pause
exit /b 1
)
echo.
pause