Tom_P Posted October 19, 2023 Posted October 19, 2023 Hi, We currently have Office 2021/2019 installed across our devices. We now want to upgrade these to Microsoft 365. Using the ODT we can run the install which removes any previous versions first, and then installs microsoft 365. I'd like to automate this by running the script at start up. However, Office 2021/2019 use the same directory as Microsoft 365 'Program Files\Microsoft Office\root\Office16'. Does anyone know the best way of scripting this, so that it will run the installer if Office 2021/2019 is installed, but not to run if M365 is already installed? Many thanks, Tom.
CHiLL Posted October 19, 2023 Posted October 19, 2023 (edited) You'll want to create something like "uninstall.xml" in the root of your Office 2021 installation folder and the XML file should contain: Then you'll want to run a script that runs: \\server\share$\Office2021\setup.exe /configure \\server\share$\Office2021\uninstall.xml You can then add your own checks or wait in the script, and then run the installer for M365. Edit: Just realised you said about checking the version - I'm not sure about that and I may have to come back about that. If you use PowerShell, you could probably get it to check the file version number and only act if it's below a certain value. Edited October 19, 2023 by CHiLL 1
Tom_P Posted October 19, 2023 Author Posted October 19, 2023 You'll want to create something like "uninstall.xml" in the root of your Office 2021 installation folder and the XML file should contain: Then you'll want to run a script that runs: \\server\share$\Office2021\setup.exe /configure \\server\share$\Office2021\uninstall.xml You can then add your own checks or wait in the script, and then run the installer for M365. Edit: Just realised you said about checking the version - I'm not sure about that and I may have to come back about that. If you use PowerShell, you could probably get it to check the file version number and only act if it's below a certain value. Thank you! I'll test and report back regarding the versions.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now