CrispyJay Posted February 10, 2023 Posted February 10, 2023 Hi all Has anyone managed actually install office 2021 via GPO? Quite helpfully there is no msi for it... Im currently using the following script; setup.exe /configure "Server\software\NETWORK\Office 2021\Configuration.txt" I've tried booting from the network and I've tried booting locally. I've tried bat and powershell. Frustratingly the scripts run for other software packages and if I click them manually. And help would be greatly appreciated Chris
CrispyJay Posted February 10, 2023 Author Posted February 10, 2023 txt should be xml. Sorry should have mentioned, done that too What version of windows have you used?
snagrat Posted February 10, 2023 Posted February 10, 2023 I assume the command is \\server as you don’t have the \\ in your post 1
CrispyJay Posted February 10, 2023 Author Posted February 10, 2023 I assume the command is \\server as you don’t have the \\ in your post Yes sorry, caught the backslashes changing the name setup.exe /configure "\\server\software\NETWORK\Office 2021\Configuration.txt"
snagrat Posted February 10, 2023 Posted February 10, 2023 Best paste the whole batch file and xml file so we can see the settings
Dan2025 Posted February 10, 2023 Posted February 10, 2023 I've not done it via GP and this is for 365apps but my bat is \\server\blahblah\setup.exe /configure \\server\blahblah\configuration.xml
LeMarchand Posted February 10, 2023 Posted February 10, 2023 Should still be: setup.exe /configure "\\server\software\NETWORK\Office 2021\Configuration.xml" Seems to be OK on W10 (various EDU versions) and 11 22H2. May be a red herring, but I have the Office folder created with the /download command in the same network location. This does seem to need periodic updating if it's a while since you did that. May be totally unconnected! Best paste the whole batch file and xml file so we can see the settings Don't forget to hide the MAK if you put it in! 1
CrispyJay Posted February 10, 2023 Author Posted February 10, 2023 Should still be: setup.exe /configure "\\server\software\NETWORK\Office 2021\Configuration.xml" Don't forget to hide the MAK if you put it in! Definitely! setup.exe /configure "\\server\software\NETWORK\Office 2021\Configuration.xml" Current Batch file (Changed a LOT through testing) config - very little changed by me, generated by the Microsoft config generator
snagrat Posted February 10, 2023 Posted February 10, 2023 Yes looks like the batch file needs the full path to setup 1
CrispyJay Posted February 10, 2023 Author Posted February 10, 2023 Yes looks like the batch file needs the full path to setup Currently trying no joy; "\\server\software\NETWORK\Office 2021\setup.exe" /configure "\\server\software\NETWORK\Office 2021\Configuration.xml"
LeMarchand Posted February 10, 2023 Posted February 10, 2023 Is this being run as a startup (Admin) or logon (user level) script? Our config. (Heavily modded; you probably won't want to copy the whole lot!).
Koldov Posted February 10, 2023 Posted February 10, 2023 Sorry for the basic questions (but genuine... interested as I haven't done mine yet through GPO): Is it a user or computer GPO? Do you know the GPO is applying/has run (manually starting GPUpdate /force or 'Group Policy Update' from the server)? What does Event Viewer say about it (if anything)? Your config has a lot of repetition, is that a copy paste error?
k-strider Posted February 10, 2023 Posted February 10, 2023 if its running logged in but not deploying does the computer have access to the share (Share and Security) as it will run in the computer context rather than user. 1
CrispyJay Posted February 10, 2023 Author Posted February 10, 2023 Is this being run as a startup (Admin) or logon (user level) script? I wanted it run as a a start up script as that's what I've had before with 19 and previous. I dont know why this one is so awkward to deploy.
LeMarchand Posted February 10, 2023 Posted February 10, 2023 I wanted it run as a a start up script as that's what I've had before with 19 and previous. I dont know why this one is so awkward to deploy. Startup should be fine.
CrispyJay Posted February 10, 2023 Author Posted February 10, 2023 Sorry for the basic questions (but genuine... interested as I haven't done mine yet through GPO): Is it a user or computer GPO? Do you know the GPO is applying/has run (manually starting GPUpdate /force or 'Group Policy Update' from the server)? What does Event Viewer say about it (if anything)? Your config has a lot of repetition, is that a copy paste error? Comp GPO so it deploys during start up. (May be that it's just not possible) Checked through wsus and the policy is definitely applying, its just not launching the exe. The script there was the windows builder config created through their website. I've started using this one; Still no joy. It may be just that it's not possible through a start up script. It definitely works manually.
LeMarchand Posted February 10, 2023 Posted February 10, 2023 Is the device wired or wireless? If the latter, it may be that the card needs setting not to turn off to save power.
CrispyJay Posted February 10, 2023 Author Posted February 10, 2023 Is the device wired or wireless? If the latter, it may be that the card needs setting not to turn off to save power. My test machine is a laptop but it's currently cabled while I do the build so I can fit it on my desk. It's worth a go though
CHiLL Posted February 10, 2023 Posted February 10, 2023 If it's a computer policy, doesn't it run as SYSTEM? Is the installer located on a share that the local SYSTEM account can access? It might be worth setting up a basic temporary share somewhere, giving everyone read/execute access and copying the installer to there, then amend the batch file to pull the setup from this new temporary share.
CrispyJay Posted February 13, 2023 Author Posted February 13, 2023 If it's a computer policy, doesn't it run as SYSTEM? Is the installer located on a share that the local SYSTEM account can access? It might be worth setting up a basic temporary share somewhere, giving everyone read/execute access and copying the installer to there, then amend the batch file to pull the setup from this new temporary share. I've robocopied the setup.exe and config file to a folder on the cdrive and ran a script that should run the setup file at start up. I've tried running from the server also where all of our software is launching from and that's not working either. Im currently testing a Scheduled task recommended by another technician.
CrispyJay Posted February 13, 2023 Author Posted February 13, 2023 I've robocopied the setup.exe and config file to a folder on the cdrive and ran a script that should run the setup file at start up. I've tried running from the server also where all of our software is launching from and that's not working either. Im currently testing a Scheduled task recommended by another technician. Deploying as a scheduled task works! Shout out to Connor @ St Mary's Catholic High School for the advise and figuring it out.
jmak Posted February 13, 2023 Posted February 13, 2023 Could you do a bullet point summary for the collective please? An anonymised version of the script would be ideal [emoji120] And what the process is, i.e. what's copied to where and what triggers the events and anything pre-work that needs doing. Very gratefully received - I'm having very similar issues.
CrispyJay Posted February 14, 2023 Author Posted February 14, 2023 (edited) Could you do a bullet point summary for the collective please? An anonymised version of the script would be ideal [emoji120] And what the process is, i.e. what's copied to where and what triggers the events and anything pre-work that needs doing. Very gratefully received - I'm having very similar issues. 1.Download Office from VLSS. Extract and copy the setup.exe to a folder on Cdrive. (We've got a folder that robocopies start menus, icons, etc. So I just put it in there) REM COPY START MENU robocopy "\\server\dfslayouts$\2022 Build\Resources" c:\Network\Resources /SEC /MIR REM UNBLOCK FILES JUST COPIEDpowershell -Command "& {dir c:\network -Recurse | Unblock-File}"powershell -Command "& {dir 'c:\program data\microsoft\windows\start menu' -Recurse | Unblock-File}" 2. Config File. I also robocopy this in the same folder. You may want to rejig this for yourself. I'll probably make tweaks also but working at the moment (If it ain't broke....) I've saved it as an xml Edited February 14, 2023 by CrispyJay
CrispyJay Posted February 14, 2023 Author Posted February 14, 2023 3. Create BAT script. I've saved and run this from the server locationbut refer to the C drive exe and config IF EXIST "C:\Program Files\MicrosoftOffice\root\Office16\WINWORD.EXE" GOTO:end"C:\NETWORK\resources\Office 2021\setup.exe" /configure"C:\NETWORK\resources\Office 2021\config.xml":end 4. Create a GPO Comp Config > Preferences > Control Panel Settings > Scheduled Tasks 5. In the same GPO I also set Computer Config > Admin Templates >System > Logon - Alwayswait for the network at computer start up and login = enabled I hope this helps. I've found that Win 11 gets youto the login screen whether or not scripts are running. You'll be able to seeif it's working by logging in and either waiting for the shortcuts to appear orkeep an eye on the task manager.
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