Office365 Package and Silent Install

ctrlaltdelllc

New Member
Prerequisites
These are the following tools I used to accomplish a self-extracting Office 365 deployment for post install. You may use other tools if you're comfortable with them, I just found this process easier with the following tools:
  • Office Deployment Tool (ODT) - download
  • WinRAR - download
  • Windows 10/8.1 Image
Steps
  1. Download ODT from Microsoft's official download page, link above.
  2. Run the ODT executable and accept the EULA, prompt will ask you to extract to a location, choose something easily accessible i.e. C:\Office365\
  3. Navigate to C:\Office365\ and edit the appropriate Office365 XML configuration file for your device architecture (x86/x64).explorer_4s521LxxdZ.png
  4. For this example we're going to edit the Office365-x64, replace the configuration with the following (refer to MSDN for supported product IDs):
    XML:
    <Configuration>
      <Add OfficeClientEdition="64">
        <Product ID="O365ProPlusRetail">
          <Language ID="en-us" />
        </Product>
      </Add>
    
      <Display Level="None" AcceptEULA="TRUE" />
    
    </Configuration>
  5. Open a Command Prompt window and change the directory to C:\Office365\ run the following command to download the the full office deployment image (this will take some time to complete depending on your internet speed):
    Code:
    setup.exe /download configuration-Office365-x64.xml
    cmd_Y52qfld18c.png
  6. Once the download completes, select all files in the directory, open the context menu (right click), and "Add to archive..."explorer_2bosnnrAur.png
  7. Checkmark the Create SFX Archive option in the Archiving Options category, verify the Archive name has changed to .exe, and click OKWinRAR_IugZZNGrEq.png
  8. Once the self extracting archive is created, right click on the Office356.exe and select "Open with WinRAR"
  9. In the newly opened WinRAR window, select the SFX option on the toolbarWinRAR_oIyKrXcYAS.png
  10. Click the "Advanced SFX Options" button at the bottom of the prompt
  11. In the General tab, change the Path to extract textbox to an easily identifiable path i.e. C:\Office365_Deploy (leave all other options as default on this page)1622234307753.png
  12. Select the Setup tab, and insert the following into Run after extraction and select "Wait and return exit code" (there are no new lines in the code; pass the appropriate architecture config file):
    Code:
    C:\Office365_Deploy\setup.exe /configure C:\Office365_Deploy\configuration-Office365-x64.xml
    1622234603860.png
  13. Select the Modes tab, and change Silent mode to "Hide All"
  14. Click OK for both prompts to finish
  15. Once WinRAR completes it's commenting process, your SFX executable should look like this1622235001553.png
  16. Add the Office365.exe application to you Post-Setup for your image, make sure it's the last application in your list as it takes quite some time to install.
Conclusion
This small step by step tutorial is a combination of various sources, varying from MSDN, NTLite Forums, and TechNet. The main SFX tutorial came from davebold370 here on NTLite forums in this post, so all credit should go to him when it comes to the main functionality of this step by step tutorial.

Mod Edit: Corrected step 5, added missing config file.
 
Last edited by a moderator:
Very nice tut - thanks.
Just to add - it's possible to make exactly the configuration.xml from OCT one want for Office version to install with extended options for each Office program.
 
Very nice tut - thanks.
Just to add - it's possible to make exactly the configuration.xml from OCT one want for Office version to install with extended options for each Office program.
Oh that's actually extremely helpful, makes it a lot easier than having to go through MSDN and manually entering in the products you're wanting to include/exclude. Thanks for that!
 
In step 5, the corrent command syntax is actually "setup.exe /download configuration-Office365-x64.xml" -or any other desired xml file. I got confused here a bit :)
 
If you create your configuration.xml from OCT it export it (download) as a configuration.xml- the specified channel and Version/ Update ID for the specific Office version is inside the configuration.xml as all Office versions is in the downloaded Office folder before install.
You can download and install in one configuration.xml.
I prefer have 2 xml - one for download the Office files folder with cmd: setup /download configuration.xml
and one for install to minimize the footprint of Windows Install - the latter should be a xml with cmd: setup /configure configuration.xml.
Remember always have the latest ODT setup.exe file.
 
Nice setup if you are in a business.
If you have 365 home, you can't customize the install, but I found to way to automate the download and run the install via powershell:


Write-Output "Installing Microsoft 365..."
$progressPreference = 'silentlyContinue'
$Destination = "$env:USERPROFILE\downloads\Microsoft365.exe"
$Source = "https://c2rsetup.officeapps.live.co...version=O16GA&source=AMC&StoreId=CFQ7TTC0K5DM"
Invoke-WebRequest $Source -OutFile $Destination
Start-Process -FilePath $Destination
Rm $destination -Force

I didn't make it silent (not sure if possible) bc in case I want to know when the install completes.
 
I am just amazed that you have the budget to deploy all these licenses.

Here I am battling with my company as they are deciding to go with the Open-source version for everything
 
Nice tuto, thanks.
I'm concerned with Office2019ProRetail.
I was at first trying to install the classic way, by adding the setup.exe in the post-setup panel, adding the "parameters" ( /configure myconfig2019.xml) in the dedicated box and copying the directory with the downloaded files directly in .\sources\$OEM$\$$\Setup\Files
Despite the fact that everything was correctly copied to C:\Windows\Setup\ during installation, when setup.exe was launched by the SetupComplete.cmd script => it immediately generated an Office error before installation could begin.

So I tried your method and it works (almost) really fine. Almost, because the installation freezes at some point, around 60-70%. This is weird because if I don't add the Office2019.exe to the post-setup and I launch it by hand once the Win10 is installed, then Office installs with no freeze. So the Office2019.exe is OK. The freeze only occurs when it is added to the post-setup.
Any ideas ?
 
I am quite desperate now.
I followed the tutorial right above. If i test the SFX on my private Laptop it installs just fine.
It even shows the Office653_Deploy Folder in C:
But when i add this to the post setup in NTLite nothing gets triggered. No extraction of the files, no installation. Nothing.

I do not know what the problem is at that point. The SFX file seems fine. its just like NTLite just ignores the Post Setup.
Any Ideas?
 
I do not know what the problem is at that point. The SFX file seems fine. its just like NTLite just ignores the Post Setup.
Any Ideas?
Windows will ignore SetupComplete if you have an OEM license. If that's the case, click "OEM SetupComplete" in the toolbar.
 
Great idea but that was not it.
I am a step further.

I just made another test, and moved the office installer in the post setup under user instead of machine.
That worked and installed it for both of the local accounts i set up.

I will run some more test also with some other installers to see if user might do the trick for them as well.
 
If you're not customizing the list of specific Office apps, this offline folder averages 3.1 GB. This gets worse when you consider the disk space temporarily involved during SFX setup:
- 1st instance when Post-Setup copies SFX file to local $$ or $1 folder​
- 2nd instance when it's self-extracted​
- 3rd instance when Office gets installed​

Why not save time, and run setup.exe directly off the DVD/USB drive?

1. Exclude any unwanted Office apps from your config, before running setup.exe /download.
XML:
<Configuration>
  <Add OfficeClientEdition="64">
    <Product ID="O365ProPlusRetail">
      <Language ID="en-us" />
      <ExcludeApp ID="Access" />
      <ExcludeApp ID="Lync" />
      <ExcludeApp ID="Publisher" />
    </Product>
  </Add>

  <Updates Enabled="TRUE" />
  <Display Level="None" AcceptEULA="TRUE" />
</Configuration>

2. Copy the same files to the mounted ISO's directory under folder \Office365_Deploy.

3. Copy/paste this script as RunOfficeSetup.bat and run from Post-Setup.
Code:
@echo off
for %%i in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do (
    if exist "%%i:\Office365_Deploy" (
        set DRIVE=%%i
        goto :EXIT
    )
)

:EXIT
cd /d %DRIVE%:\Office365_Deploy && .\setup.exe /configure configuration-Office365-x64.xml

Windows 10 x64-2022-07-27-09-21-08.png
 
If you're not customizing the list of specific Office apps, this offline folder averages 3.1 GB. This gets worse when you consider the disk space temporarily involved during SFX setup:
- 1st instance when Post-Setup copies SFX file to local $$ or $1 folder​
- 2nd instance when it's self-extracted​
- 3rd instance when Office gets installed​

Why not save time, and run setup.exe directly off the DVD/USB drive?

1. Exclude any unwanted Office apps from your config, before running setup.exe /download.
XML:
<Configuration>
  <Add OfficeClientEdition="64">
    <Product ID="O365ProPlusRetail">
      <Language ID="en-us" />
      <ExcludeApp ID="Access" />
      <ExcludeApp ID="Lync" />
      <ExcludeApp ID="Publisher" />
    </Product>
  </Add>

  <Updates Enabled="TRUE" />
  <Display Level="None" AcceptEULA="TRUE" />
</Configuration>

2. Copy the same files to the mounted ISO's directory under folder \Office365_Deploy.

3. Copy/paste this script as RunOfficeSetup.bat and run from Post-Setup.
Code:
@echo off
for %%i in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do (
    if exist "%%i:\Office365_Deploy" (
        set DRIVE=%%i
        goto :EXIT
    )
)

:EXIT
cd /d %DRIVE%:\Office365_Deploy && .\setup.exe /configure configuration-Office365-x64.xml

View attachment 7781

Oh thats a great idea. I will give it a try.
Thank you so much for that.
 
Nice tuto, thanks.
I'm concerned with Office2019ProRetail.
I was at first trying to install the classic way, by adding the setup.exe in the post-setup panel, adding the "parameters" ( /configure myconfig2019.xml) in the dedicated box and copying the directory with the downloaded files directly in .\sources\$OEM$\$$\Setup\Files
Despite the fact that everything was correctly copied to C:\Windows\Setup\ during installation, when setup.exe was launched by the SetupComplete.cmd script => it immediately generated an Office error before installation could begin.

So I tried your method and it works (almost) really fine. Almost, because the installation freezes at some point, around 60-70%. This is weird because if I don't add the Office2019.exe to the post-setup and I launch it by hand once the Win10 is installed, then Office installs with no freeze. So the Office2019.exe is OK. The freeze only occurs when it is added to the post-setup.
Any ideas ?

The same Probem here .. any ideas ?


1659874022130.png
 
The same Probem here .. any ideas ?
There's two different methods mentioned in above. Are you using the 2nd, and running Office2019.exe?
That app has to run from an user environment, try it from User - Execution (not Machine).
 
Back
Top