:: Made by Hoang Hung @echo off title Install Office Click To Run color 0f pushd "%~dp0" echo Step 1. Extract office deployment tool if not exist "%~dp0\Bin\setup.exe" ( md temp md Bin for /f %%A in ('dir /b officedeploymenttool*.exe') do ( echo.&echo Extracting %%A...&echo. %%A /extract:temp /quiet ) move "%~dp0\temp\setup.exe" "%~dp0\Bin" >nul 2>&1 rd "%~dp0\temp" /s /q ) else ( echo.&echo Office deployment tool has extracted ) echo ======================================================= echo Step 2. Download file from "configuration.xml" if not exist "%~dp0configuration.xml" goto:exit echo.&echo Downloading file, keep your connection... "%~dp0\Bin\setup.exe" /download configuration.xml echo.&echo Download completed echo ======================================================= echo Step 3. Install office from "configuration.xml" echo.&echo Installing office, do not turn off your computer... "%~dp0\Bin\setup.exe" /configure configuration.xml echo.&echo Install completed if not exist "%~dp0Setup_Offline.cmd" ( echo @echo off > Setup_Offline.cmd echo "%~dp0\Bin\setup.exe" /configure configuration.xml >> Setup_Offline.cmd echo exit >> Setup_Offline.cmd ) timeout 3 del %0 /q /f exit :exit echo.&echo configuration.xml not exist, please generator it and save to this folder echo.&echo Press any key to exit ! pause >nul