使用Office 部署工具 (ODT) 定制Office软件包
通常Office安装包整合了一些我们不常用的软件,比如Access,所以我们要删减这些软件;步骤如下:
下载 Office 部署工具
目前仅有英文版本的Office Deployment Tool 下载完成点击解压,会得到一个setup.exe和默认的配置文件,默认配置文件无需理会
自定义配置文件
打开官方的在线安装包的自定义工具:https://config.office.com/deploymentsettings
根据里面的选项可以得到自己想的配置文件xml,并导出保存到setup.exe同一目录下
<Configuration ID="e0ba6d9a-5aad-4e7b-844f-3031a04520ee">
<Info Description="colinqi" />
<Add OfficeClientEdition="64" Channel="PerpetualVL2021">
<Product ID="ProPlus2021Volume" PIDKEY="FXYTK-NJJ8C-GB6DW-3DYQT-6F7TH">
<Language ID="en-us" />
<ExcludeApp ID="Access" />
<ExcludeApp ID="Lync" />
<ExcludeApp ID="OneDrive" />
<ExcludeApp ID="Outlook" />
<ExcludeApp ID="Teams" />
</Product>
</Add>
<Property Name="SharedComputerLicensing" Value="0" />
<Property Name="FORCEAPPSHUTDOWN" Value="TRUE" />
<Property Name="DeviceBasedLicensing" Value="0" />
<Property Name="SCLCacheOverride" Value="0" />
<Property Name="AUTOACTIVATE" Value="1" />
<Updates Enabled="TRUE" />
<RemoveMSI />
<AppSettings>
<Setup Name="Company" Value="Colin" />
</AppSettings>
</Configuration>
根据配置文件下载Office安装包
执行以下命令可以根据configuration.xml马上下载好Office软件包
setup.exe /download COnfiguration.xml
以上命令需要在cmd的管理员下执行,也可以创建bat来自动执行
@echo off
echo Running command...
set "cmd=cmd /c setup.exe /download Configuration.xml"
if not exist "setup.exe" (
echo Error: setup.exe not found in current directory.
pause
exit /b 1
)
%cmd%
echo Command finished.
pause
以下bat命令在执行中会出现闪烁点,下载完成后提示Command finished, 按任何键退出!
安装自定义软件包
在cmd的管理员下执行以下命令开始安装
setup.exe /configure Configuration.xml
也可以合作bat命令行来自动执行
@echo off
echo Running command...
set "cmd=cmd /c setup.exe /configure Configuration.xml"
if not exist "setup.exe" (
echo Error: setup.exe not found in current directory.
pause
exit /b 1
)
%cmd%
echo Command finished.
pause
最后可以通过HEU_KMS_Activator来免费激活Office,或者付费购买正版
Leave a Reply
You must be logged in to post a comment.