|
@echo off&mode con cols=90 lines=30
title Setup_Office2021_ClicktoRun
color 0a
setlocal enabledelayedexpansion
echo.
echo.
echo ^>^>^> Setup_Office2021_ClicktoRun-Toolkits ^<^<^<
echo.
echo ------------------------------------------------------------
rd %systemdrive%\users\Dir_Test>nul 2>nul
md %systemdrive%\users\Dir_Test>nul 2>nul||(Echo Please right click and run as administrator. &&Pause >nul&&Exit)
rd %systemdrive%\users\Dir_Test>nul 2>nul
echo The time is %time%.
echo.
set /a Tday=0
set "T1=%time%"
echo This kits needs uninstall the old msi office first.
echo Please exit if the old msi office is still exist ^!
pause
set sn_Office=X44PH-RN4WT-8BK8K-RBDGG-684XY
::set sn_Office=QR9PF-NR2KR-W6C2C-9J7V2-HH8KY
::set sn_Office=3672M-2NVJG-HJDG2-3VQFK-YDW4P
set sn_Word=P4H2J-3N26Q-4699G-99Q2V-BDW6H
set sn_Visio=MPWNJ-9PPFV-J2JY4-BHDVG-CGYWM
set sn_Access=XYMWH-7BNJJ-87FHY-VYT2V-4C4TY
::set sn_Access=YBGNX-H64JX-J6Q38-JQTT9-QV9DB
set sn_Project=QC9JN-C494W-FV7D9-Q4799-RM6DQ
echo.
echo The key of Office is:!sn_Office!
echo.
echo The key of Visio is:!sn_Visio!
echo.
cd /d %~dp0
::%~dp0Setup /download %~dp0Cfg_Office2021_Vol.xml
::%~dp0Setup /configure %~dp0Cfg_Office2021_Vol.xml
cd /d "%ProgramFiles%\Microsoft Office\Office16\"
for /f %%i in ('dir /b "..\root\Licenses16\Proplu*VL_MAK*.xrm-ms" ') do cscript ospp.vbs /inslic:"..\root\Licenses16\%%i"
for /f %%i in ('dir /b "..\root\Licenses16\Standar*vl_mak*.xrm-ms" ') do cscript ospp.vbs /inslic:"..\root\Licenses16\%%i"
for /f %%i in ('dir /b "..\root\Licenses16\Proplu*MSDN*Retail*.xrm-ms" ') do cscript ospp.vbs /inslic:"..\root\Licenses16\%%i"
for /f %%i in ('dir /b "..\root\Licenses16\Wor*VL_MAK*.xrm-ms" ') do cscript ospp.vbs /inslic:"..\root\Licenses16\%%i"
for /f %%i in ('dir /b "..\root\Licenses16\Exce*VL_MAK**.xrm-ms" ') do cscript ospp.vbs /inslic:"..\root\Licenses16\%%i"
for /f %%i in ('dir /b "..\root\Licenses16\Power*VL_MAK*.xrm-ms" ') do cscript ospp.vbs /inslic:"..\root\Licenses16\%%i"
for /f %%i in ('dir /b "..\root\Licenses16\Visio*VL_MAK*.xrm-ms" ') do cscript ospp.vbs /inslic:"..\root\Licenses16\%%i"
for /f %%i in ('dir /b "..\root\Licenses16\VisioPr*Retail*.xrm-ms" ') do cscript ospp.vbs /inslic:"..\root\Licenses16\%%i"
for /f %%i in ('dir /b "..\root\Licenses16\Acces*VL_MAK*.xrm-ms" ') do cscript ospp.vbs /inslic:"..\root\Licenses16\%%i"
for /f %%i in ('dir /b "..\root\Licenses16\Acces*Retail*.xrm-ms" ') do cscript ospp.vbs /inslic:"..\root\Licenses16\%%i"
cscript.exe ospp.vbs /inpkey:!sn_Office!
::cscript.exe ospp.vbs /inpkey:!sn_Visio!
::cscript.exe ospp.vbs /actcid:033804567853347672646940622625552955120571712154
cscript.exe ospp.vbs /Act
set "T2=%time%"
if "%T2:~,2%" lss "%T1:~,2%" (set Tday+=8640000)
set /a "T_d=%Tday%+(%T2:~,2%*360000)+(%T2:~3,1%*60000+%T2:~4,1%*6000)+(%T2:~6,1%*1000+%T2:~7,1%*100)+(%T2:~9,1%*10+%T2:~-1%)-(%T1:~,2%*360000)-(%T1:~3,1%*60000+%T1:~4,1%*6000)-(%T1:~6,1%*1000+%T1:~7,1%*100)-(%T1:~9,1%*10+%T1:~-1%)"
set /a "ss=%T_d%/100%%60"
set /a "mm=%T_d%/6000%%60"
set /a "hh=%T_d%/360000%%1"
set /a "ms=%T_d%%%100"
echo.
echo The time is %time%,this option has consumed %hh%:%mm%:%ss%.%ms%.
echo.
pause
|
|