Jump to content

CTGR-Jack

Members
  • Posts

    3
  • Joined

  • Last visited

Reputation

1 Neutral

About CTGR-Jack

  1. Petben, I finished creating my script for our Office rollout. It has some additional items on it along with the things that you recommended. I included some basic logging of the process along with recording the Exit Code from the install itself in case there are issues. Our script runs every time the computer boots up, but only runs the install if it detects that it's not already on there. This script is for Office 2024, but O365 just uses a different registry key to check, but other than that it's exactly the same. Thanks and take care! #Set ProductName to Registry Value in Uninstall Key $ProductName="ProPlus2024Volume - en-us" #Set DeployServer to a network-accessible location containing the Office setup.exe installer. $DeployServer="\\domain.local\dfsroot\Software\MSOffice2024" #Set ConfigFile to the configuration file to be used for deployment (required) $ConfigFile="\\domain.local\dfsroot\Software\MSOffice2024\Office2024.xml" $LogLocation="\\domain.local\dfsroot\Software\MSOffice2024\LogFiles" # Start service $StartServiceJob = { While (1) { If((Get-Service -Name TrustedInstaller).Status -ne 'Running') { Write-Host "$((get-date).ToLongTimeString()) - Starting Trusted Installer service as it was not running. " Start-Service -Name TrustedInstaller Get-Service -Name TrustedInstaller } else { Write-Host "$((get-date).ToLongTimeString()) - Service already running..." } Start-Sleep 10 } } #Check for Office, Exit if True $RegCheck = Test-Path -Path "Registry::HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$($ProductName)" #$RegCheck = Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$($ProductName)" -ErrorAction SilentlyContinue If ($RegCheck) { Exit } #Log Start "$(get-date) Begin Office 2024 Install" | Out-File -FilePath "$($LogLocation)\$($env:COMPUTERNAME).txt" -Append -Encoding ASCII # Start-Job starts a background job on the local computer that runs a command without interacting with the current session. Start-Job $StartServiceJob Clear-Host # Install new version Write-Host "Installing Office 2024, please wait...." -ForegroundColor White $Process = Start-Process "\\domain.local\dfsroot\software\MSOffice2024\setup.exe" -ArgumentList "/configure $($ConfigFile)" -Wait -PassThru -WindowStyle Minimized #Log End "$(get-date) Setup ended with error code $($Process.ExitCode)" | Out-File -FilePath "$($LogLocation)\$($env:COMPUTERNAME).txt" -Append -Encoding ASCII #Remove Job Write-Host "Stopping and removing job" Get-Job | Stop-Job Get-Job | Remove-Job
  2. That's it! I confirmed that if I manually started the 'Windows Modules Installer' service (AKA TrustedInstaller) that the 'UNINSTALLCENTENNIAL' task finishes within a short period of time. I played around with the service and determined that it normally doesn't run (set to 'Manual' startup) and launches when needed or requested, but for some reason the Office task isn't telling it to do it, at least not during computer startup. I attempted to start the service before running the task, but the service shuts down after 2 minutes of inactivity and it usually takes longer than 2 minutes to get to that point in the installation, so I'll give your background task a try. I even tried to set the service to 'Automatic' temporarily but it still shuts down after 2 minutes, and in fact, even changes the startup type back to Manual as soon as it starts. Thank you SO much for responding! As to your question, I normally have the 'Display Level' set to 'None' when I'm doing our installs, but I did change it to 'Full' while I was testing things, though it made no difference of course to the outcome.
  3. Petben, did you ever find a solution? We are having the same exact problem, both with Office 365 and even the LTSC 2024 version which we have a few volume licenses. It's the exact same issue, it only occurs when it's being installed via computer startup script. The script works fine when ran under an interactive user account (with admin rights of course). It always gets stuck on the UNINSTALLCENTENNIAL task, despite the fact the the logs even show that it looks for and fails to locate it installed on the PC anyway. As you say, it tries every 10 minutes until Group Policy finally gives up and terminates the script. Thanks!
×
×
  • Create New...