Exclude Office apps that you don't need to install
Microsoft Office 2019 and up (including 2021 and 2024) does not provide MSI installation, only Click-to-Run (C2R), it requires Office Deployment Tool (ODT) in order for you to customize the installation.
Answer the following questions on the Office Customization Tool XML generator.
If you are using Retail IMG, you need to convert the generated XML file to Retail, as the Office Customization Tool XML generator does not allow you to select Retail version, only volume version.
Volume to retail
You need to convert to retail in order to install Microsoft Office using your configuration file.
Open your generated XML file.
Change the Product tag’s ID and PIDKEY attribute.
For Microsoft Office 2024, change the Product tag to <Product ID="ProPlus2024Retail" PIDKEY="XJ2XN-FW8RK-P4HMP-DKDBV-GCVGB">.
For Microsoft Office 2021, change the Product tag to <Product ID="ProPlus2021Retail" PIDKEY="FXYTK-NJJ8C-GB6DW-3DYQT-6F7TH">.
For Microsoft Office 2019, change the Product tag to <Product ID="ProPlus2019Retail" PIDKEY="NMMKJ-6RK4F-KMJVX-8D9MJ-6MWKP">.
Change the Channel attribute to Monthly or Current. (PerpetualVL channel does not work on Retail.)
For Monthly for stability, change the Channel attribute to Channel="Monthly".
For Current for the latest features, change the Channel attribute to Channel="Current".
Microsoft Office installation
Put your configuration file on the folder where you extracted the deployment tool.
Run command prompt on the folder where you extracted the deployment tool.
Type setup /configure config.xml where config.xml is the filename of the configuration file.
My example configuration
My configuration file excludes Access, Groove, Lync, OneDrive, OneNote, and Outlook (as I don’t need them) and uses the E:\ path for the installer, as I mounted the IMG file on Windows.