Closed ThomasPatzig closed 1 year ago
maybe this path combine is the root cause:
$binDir = "$($toolsDir)\..\bin"
$logDir = "$($toolsDir)\..\logs"
and can be solved by this:
$binDir = [System.IO.Path]::GetFullPath("$($toolsDir)\..\bin")
$logDir = [System.IO.Path]::GetFullPath("$($toolsDir)\..\logs")
have identify the root cause: choco uninstall of this package doesn't work!
it must be uninstalled with "OfficeClickToRun" at first:
"C:\Program Files\Common Files\microsoft shared\ClickToRun\OfficeClickToRun.exe" scenario=install scenariosubtype=uninstall platform=x86 version.16=16.0 culture=en-us productstoremove=ProPlus2019Volume.16_en-us_x-none DisplayLevel=False
or
"C:\Program Files\Common Files\microsoft shared\ClickToRun\OfficeClickToRun.exe" scenario=install scenariosubtype=uninstall platform=x86 version.16=16.0 culture=en-us productstoremove=Excel2019Volume.16_en-us_x-none DisplayLevel=False
or
"C:\Program Files\Common Files\microsoft shared\ClickToRun\OfficeClickToRun.exe" scenario=install scenariosubtype=uninstall platform=x86 version.16=16.0 culture=en-us productstoremove=(whatever).16_en-us_x-none DisplayLevel=False
then choco uninstall works
and the choco install works again.
@sbaerlocher suggestion:
add code to "chocolateyuninstall.ps1" to read current installed product release from registry:
var currentInstalledOffice = registry.TryGetValue<string>(@"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\ClickToRun\Configuration", "ProductReleaseIds");
and run an uninstall of it:
"C:\Program Files\Common Files\microsoft shared\ClickToRun\OfficeClickToRun.exe" scenario=install scenariosubtype=uninstall platform=x86 version.16=16.0 culture=en-us productstoremove={currentInstalledOffice}.16_en-us_x-none DisplayLevel=False
got this error log output:
...and this detailed log: have just replaced my user name by
<user>