Uninstall Office 2010 starts, reboots pc and did nothing ?
Ok, i'm basically testing PDQ deploy atm but so far i'm very impressed by it's speed.
I am trying to uninstall an unattended installed version of office 2010 Pro plus on a test pc and it seems to do nothing.
I see in the processes that it starts the setup.exe located locally on the target pc, the setup itself does next to nothing cpu wise, after a few minutes the pc reboots (can you disable that in pdq deploy or is that the setup.exe from Office 2010 doing that, the xml specifically sais no reboot)
After the reboot i still see the complete installation of office 2010 untouched.
We did not install office 2010 to it's default directory but the setup shouldn't have trouble with that ?
I can push installs to the same machine so it isn't a problem with the necessary rights.
PDQdeploy doesn't give me an error code, just a plain "failed" with the next line in it's output log :
Uninstall : "C:\Program Files (x86)\Common Files\Microsoft Shared\OFFICE14\Office Setup Controller\setup.exe" /uninstall PROPLUS /dll OSETUP.DLL /config C:\users\xxxx\AppData\Local\Temp\config.xml
This seems the correct uninstall string to me and worked when i tried it locally. But through PDQdeploy it doesn't.
Any idea's what causes the setup.exe process not to uninstall ?
Many thanks !
Comments
Seth,
I am not sure where I got it from, but PDQ put out a PowerShell script a while ago that uninstalls all versions of Microsoft Office. You might want to try their PowerShell script and see if that works, although you should definitely run it on a test machine before you roll the script into production:
-----
<#
AUTHOR: Kris Powell, Admin Arsenal
DATE: 1/28/2016
This will attempt to uninstall Microsoft Office for all versions. Please test in your environments before rolling out for production.
Tested with Powershell v4
#>
$PatternProductID = '(?(?=^[^\.]+$)\S*|(?<=\.)\S*)'
$xmlFile = "$env:TEMP\config.xml"
$Installs = @()
$Installs += Get-ItemProperty "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*" -ErrorAction SilentlyContinue | ? {$_.DisplayName -like "Microsoft Office*"} | ? {$_.PSChildName -match '^(?!{).*'}
$Installs += Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*" -ErrorAction SilentlyContinue | ? {$_.DisplayName -like "Microsoft Office*"} | ? {$_.PSChildName -match '^(?!{).*'}
$Installs | ? {$_} | % {
$productID = $(if ($_.PSChildName -Match $PatternProductID) {$matches[0]} else {$_.PSChildName})
If ($_.UninstallString -match "ClickToRun") {
$UninstallString = "$($_.UninstallString) DisplayLevel=False"
}
Else {
([XML] "
<Configuration Product=`"$ProductID`">
<Display Level=`"none`" CompletionNotice=`"no`" SuppressModal=`"yes`" AcceptEula=`"yes`" />
<Setting Id=`"SETUP_REBOOT`" Value=`"Never`" />
</Configuration>
").Save($XmlFile)
$UninstallString = "$($_.UninstallString) /config $xmlFile"
}
$FilePathPattern = '"([^"]*)"'
$FilePath = If ($UninstallString -match $FilePathPattern) {$matches[0]}
$Arguments = $UninstallString -replace [regex]::Escape($FilePath), ""
"{0,-15} {1}" -f "Program Name:", $($_.DisplayName) | Write-Output
"{0,-15} {1}" -f "ProductID:", $(if ($_.PSChildName -Match $PatternProductID) {$matches[0]} else {$_.PSChildName}) | Write-Output
"{0,-15} {1}" -f "Uninstall:", $UninstallString | Write-Output
Write-Output ""
Start-Process -FilePath $FilePath -ArgumentList $Arguments -Wait
If (Test-Path $XmlFile) {Remove-Item $xmlFile}
}
Thank you for your response, i tried your powershell script this morning and it has the exact same behavior as my own uninstall string and the "official" package.
The setup starts in the background, runs a minute or so then suddenly the pc reboots (normal restart) and nothing has changed.
Powershell returned error code 1 (which i assume is because the pc restarted) and the outputlog just contains the standard uninstall string like i mentioned in my first mail.
I can uninstall the office version perfectly when doing it manually through its uninstaller and even when i launch that very same command manually from the client pc itself.
Now i tried yet another method where is used the offscub10.vbs script that microsoft itself uses to remove office 2010 in case of issues.
I push it from a network location and the file does get executed without issues but after a minute or two the target pc gets rebooted.
When i do the exact thing manually on the computer itself it uninstalls correctly.
So now i'm thinking it is pdqdeploy that sends a reboot for some reason since it only happens when i push it through pdqdeploy.
I am trying the same vbs script now through psexec to push it to a target pc and the computer does not reboot.
So it must be pdqdeploy for some reason ?
Seth,
Could you please export the PDQ Deploy package that you are testing with and post it here?
i'll have to do it next monday, i'm not at the office anymore atm. But i'll keep you informed.
This is what I use. Make an xml file and put it in the same directory as setup.exe, run the package.
In regard to your question about why it works locally for you but not through deploy, is probably something trying to run out of appdata directory. Antivirus could be preventing it or permissions on the remote machine. Or the file doesn't exist under the context of appdata for the user you are deploying as.
<path to MS office package>\setup.exe /uninstall PROPLUS /config "SilentUninstall.xml" /dll OSETUP.DLL
SilentUninstall.xml below
<Configuration Product="ProPlus">
<Display Level="none" CompletionNotice="no" SuppressModal="yes" AcceptEula="yes" />
<Setting Id="SETUP_REBOOT" Value="NEVER" />
</Configuration>
Please sign in to leave a comment.