Can you show me if there is something wrong in this script below? Or show me how do I improve it?
Code:
@echo off
title Microsoft Office Deployment Tool Installer Script ver.01
net session >nul 2>&1
if %errorLevel% == 0 (goto :continue) else (
echo.
echo. [ERROR] This script requires administrator privileges to run.
echo. [INFO] To do so, right-click on this script and select "Run as administrator"
echo.
pause
goto :eof
)
:continue
echo.
echo. -----------------------------------
echo. [WARNING] DO NOT CLOSE THIS WINDOW!
echo. -----------------------------------
echo.
echo [Office Deployment Tool] Downloading installation files, this may take time...
call "%~dp0Office\setup.exe /download %~dp0Office\Office2021(Excel,PowerPoint,Publisher,Word)_Configuration.xml"
cls
echo.
echo. -----------------------------------
echo. [WARNING] DO NOT CLOSE THIS WINDOW!
echo. -----------------------------------
echo.
echo [Office Deployment Tool] Installing Microsoft Office, this may take time...
call "%~dp0Office\setup.exe /configure %~dp0Office\Office2021(Excel,PowerPoint,Publisher,Word)_Configuration.xml"
cls
echo.
echo. -----------------------------------
echo. [WARNING] DO NOT CLOSE THIS WINDOW!
echo. -----------------------------------
echo.
echo [INFO] Configuring, please wait...
call "%~dp0Ac†ïvâ†ør\AutoRenewal-Setup.cmd"
cls
echo.
echo. [INFO] Microsoft Office is successfully installed.
echo. [INFO] You can now close this window by pressing any key on your keyboard or by clicking the close button.
echo.
pause
exit /b