diff --git a/certimailer.bat b/certimailer.bat index e69de29..00878df 100644 --- a/certimailer.bat +++ b/certimailer.bat @@ -0,0 +1,69 @@ +@echo off +setlocal EnableDelayedExpansion + +REM Function to check if a command is available +:Test-Command + set "Command=%1" + where "%Command%" >nul 2>nul + if %errorlevel% equ 0 ( + echo %Command% is already installed. + ) else ( + echo %Command% not found. Installing... + call :Install-%Command% + echo %Command% installed successfully. + ) + goto :eof + +REM Function to display loading animation +:Loading-Animation + set "LoadInterval=%1" + set "LoadingMessage=%2" + set "LoadingAnimation=—\|/" + set "Elapsed=0" + + set "Spinner=" + for /L %%i in (1,1,%LoadInterval%) do ( + for %%c in (!LoadingAnimation!) do ( + set "Spinner=%%c" + set /P "=!Spinner! " nul + set /P "="