diff --git a/OPTY.bat b/OPTY.bat index cd07f83..0eb61bb 100644 --- a/OPTY.bat +++ b/OPTY.bat @@ -1,9 +1,10 @@ +:: 2023-11-23 : Add Logs :: Change-logs : Found on Readme.md GitHub @echo off REM set variables -set current_version=01.0.5 +set current_version=01.0.6 set GitHubRawLink=https://raw.githubusercontent.com/YDeltagon/OPTY/master/resources/ set GitHubLatestLink=https://github.com/YDeltagon/OPTY/releases/latest/download/ REM Set variables for logs @@ -15,6 +16,7 @@ set logs="%~dp0\logs_%date%_%current_time%.txt" REM Check if running as administrator net session >nul 2>&1 if %errorlevel% == 0 ( + echo %date% %time% : Admin >> %logs% set admin=1 echo. echo Running as administrator @@ -22,6 +24,7 @@ if %errorlevel% == 0 ( timeout /t 1 goto shortcut ) else ( + echo %date% %time% : Non-Admin >> %logs% set admin=0 echo. echo Not running as administrator @@ -35,6 +38,7 @@ if %errorlevel% == 0 ( REM Check if running from C:\OPTY_by-YannD\OPTY.bat if not copy it to C:\OPTY_by-YannD\OPTY.bat and create a shortcut on desktop :shortcut if not "%~dp0" == "C:\OPTY_by-YannD\" ( + echo %date% %time% : Creta shurtcut >> %logs% md "C:\OPTY_by-YannD" xcopy /y %~dp0OPTY.bat C:\OPTY_by-YannD curl -o "%~dp0Shortcut_OPTY.ps1" -LJO %GitHubRawLink%Shortcut_OPTY.ps1 @@ -58,6 +62,7 @@ echo Check GitHub ping... echo. ping -n 1 -l 8 github.com | find "TTL=" if %errorlevel%==0 ( + echo %date% %time% : Ping GitHub réussi >> %logs% color 20 echo. echo Ping check successful. @@ -65,6 +70,7 @@ if %errorlevel%==0 ( timeout /t 1 goto update_opty ) else ( + echo %date% %time% : Ping GitHub raté >> %logs% color 40 echo. echo Ping check failed, retrying... @@ -117,6 +123,7 @@ if /i "%choice%"=="N" goto update_found_and_not_accepted REM If user accept update, download new OPTY.bat and replace the old one :update_found_and_accepted +echo %date% %time% : update_found_and_accepted >> %logs% cls color 02 echo. @@ -131,6 +138,7 @@ exit REM If user don't accept update, exit :update_found_and_not_accepted +echo %date% %time% : update_found_and_not_accepted >> %logs% cls color 04 echo. @@ -143,6 +151,7 @@ call "Menu.bat" REM If no update is available, continue :update_not_available +echo %date% %time% : update_not_available >> %logs% color 30 cls echo.