chocolatey / chocolatey-licensed-issues

Issues for Licensed Editions of Chocolatey
19 stars 13 forks source link

Some Packages still won't install, as before licensed.extension 3.0.0 #287

Closed FLeven closed 2 years ago

FLeven commented 2 years ago

What You Are Seeing?

I updated to the newest versions and still internalized packages like adobereader, fslogix or Corretti8jre want install anymore. Also internal packages unzipping to "C:\" still don't work #284

5056 [ERROR] - ERROR: Der Verzeichnisname ist ung�ltig -> ?Path/foldername wrong?

2022-01-19 18:05:46,659 5056 [ERROR] - The install of adobereader was NOT successful. 2022-01-19 18:05:46,674 5056 [ERROR] - Error while running 'C:\ProgramData\chocolatey\lib\adobereader\tools\chocolateyinstall.ps1'. See log for details.

What is Expected?

Flawless installation as before chocolatey.extension 3.0.0

How Did You Get This To Happen? (Steps to Reproduce)

Internalize one of those packages, push to a nexus. install:

choco install adobereader -r -i

System Details

Server 2019 (German Version) Powershell 5.1 Chocolatey 0.12.0 Chocolatey.extension 3.1.0

AdobeReader:

2022-01-19 18:05:07,425 5056 [DEBUG] - _ Chocolatey:ProChocolateyInstallCommand - Normal Run Mode _
2022-01-19 18:05:07,440 5056 [INFO ] - Installing the following packages:
2022-01-19 18:05:07,471 5056 [INFO ] - adobereader
2022-01-19 18:05:07,471 5056 [INFO ] - By installing, you accept licenses for the packages.
2022-01-19 18:05:07,534 5056 [DEBUG] - Switching source name TCL to actual source value 'https://nexus.tclan.technocargo.de:8082/repository/Choco/'.
2022-01-19 18:05:07,893 5056 [DEBUG] - Resolving reference to chocolatey.licensed...
2022-01-19 18:05:08,034 5056 [DEBUG] - Using 'https://nexus.tclan.technocargo.de:8082/repository/Choco/'.
2022-01-19 18:05:09,206 5056 [DEBUG] - - Supports prereleases? 'True'.
2022-01-19 18:05:09,206 5056 [DEBUG] - - Is ServiceBased? 'True'.
2022-01-19 18:05:09,800 5056 [DEBUG] - Package 'adobereader' found on source 'https://nexus.tclan.technocargo.de:8082/repository/Choco/'
2022-01-19 18:05:21,831 5056 [INFO ] - [NuGet] Installing 'adobereader 2021.011.20039'.
2022-01-19 18:05:21,862 5056 [DEBUG] - [NuGet] Added file 'chocolateyinstall.ps1' to folder 'adobereader\tools'.
2022-01-19 18:05:21,878 5056 [DEBUG] - [NuGet] Added file 'chocolateyuninstall.ps1' to folder 'adobereader\tools'.
2022-01-19 18:05:22,128 5056 [DEBUG] - [NuGet] Added file 'AcroRdrDC1500720033_MUI.exe' to folder 'adobereader\tools\files'.
2022-01-19 18:05:22,143 5056 [DEBUG] - [NuGet] Added file 'AcroRdrDC1500720033_MUI.exe.ignore' to folder 'adobereader\tools\files'.
2022-01-19 18:05:22,503 5056 [DEBUG] - [NuGet] Added file 'AcroRdrDCUpd2101120039_MUI.msp' to folder 'adobereader\tools\files'.
2022-01-19 18:05:22,518 5056 [DEBUG] - [NuGet] Added file 'AcroRdrDCUpd2101120039_MUI.msp.ignore' to folder 'adobereader\tools\files'.
2022-01-19 18:05:23,159 5056 [DEBUG] - [NuGet] Added file 'adobereader.nupkg' to folder 'adobereader'.
2022-01-19 18:05:23,518 5056 [DEBUG] - [NuGet] Added file 'adobereader.nuspec' to folder 'adobereader'.
2022-01-19 18:05:23,518 5056 [INFO ] - [NuGet] Successfully installed 'adobereader 2021.011.20039'.
2022-01-19 18:05:23,518 5056 [INFO ] - 
adobereader v2021.011.20039
2022-01-19 18:05:23,565 5056 [INFO ] - adobereader package files install completed. Performing other installation steps.
2022-01-19 18:05:23,784 5056 [DEBUG] - Setting installer args for adobereader
2022-01-19 18:05:23,784 5056 [DEBUG] - Setting package parameters for adobereader
2022-01-19 18:05:23,784 5056 [DEBUG] - Contents of 'C:\ProgramData\chocolatey\lib\adobereader\tools\chocolateyinstall.ps1':
2022-01-19 18:05:23,815 5056 [DEBUG] - $LicensedCommandsRegistered = Get-Command "Invoke-ValidateChocolateyLicense" -EA SilentlyContinue
if (!$LicensedCommandsRegistered) {
  Write-Warning "Package Requires Commercial License - Installation cannot continue as Package Internalizer use require endpoints to be licensed with Chocolatey Licensed Extension v3.0.0+ (chocolatey.extension). Please see error below for details and correction instructions."
  throw "This package requires a commercial edition of Chocolatey as it was built/internalized with commercial features. Please install the license and install/upgrade to Chocolatey Licensed Extension v3.0.0+ as per https://docs.chocolatey.org/en-us/licensed-extension/setup."
}

Invoke-ValidateChocolateyLicense -RequiredLicenseTypes @('Business','ManagedServiceProvider')

$ErrorActionPreference = 'Stop'

$DisplayName = 'Adobe Acrobat Reader DC MUI'

$MUIurl = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)\files\AcroRdrDC1500720033_MUI.exe"
$MUIchecksum = 'dfc4b3c70b7ecaeb40414c9d6591d8952131a5fffa0c0f5964324af7154f8111'
$MUImspURL = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)\files\AcroRdrDCUpd2101120039_MUI.msp"
$MUImspChecksum = '8a854f2bd07229cb43901f7cec8755b8dde9eeea5671230cc573970ced299f687af5d22b3c962e454058d09bf6edeb8448aacb56f6fb1bf65ef9017a9b875d61'

$MUIinstalled = $false
$UpdateOnly = $false
[array]$key = Get-UninstallRegistryKey -SoftwareName $DisplayName.replace(' MUI', '*')

$MUImspURL -match 'AcroRdrDCUpd(\d+)_'
$UpdaterVersion = $Matches[1]

$PackageParameters = Get-PackageParameters

if ($key.Count -eq 1) {
   $InstalledVersion = $key[0].DisplayVersion.replace('.', '')
   if ($key[0].DisplayName -notmatch 'MUI') {
      if (($InstalledVersion -ge $UpdaterVersion) -and !($PackageParameters.OverwriteInstallation)) {
         Write-Warning "The currently installed $($key[0].DisplayName) is a single-language install."
         Write-Warning "You will need to uninstall $($key[0].DisplayName) first or use /OverwriteInstallation."
         Throw 'Installation halted.'
      }
      elseif (($InstalledVersion -ge $UpdaterVersion) -and $PackageParameters.OverwriteInstallation) {
         Write-Warning "The currently installed $($key[0].DisplayName) is a single-language install."
         Write-Warning  'This package will replace it with the multi-language (MUI) release (Installation overwrite).'
      }
      else {
         Write-Warning "The currently installed $($key[0].DisplayName) is a single-language install."
         Write-Warning  'This package will replace it with the multi-language (MUI) release.'
      }
   }
   else {
      $MUIinstalled = $true
      if ($InstalledVersion -eq $UpdaterVersion) {
         Write-Verbose 'Currently installed version is the same as this package.  Nothing further to do.'
         Return
      }
      elseif ($InstalledVersion -gt $UpdaterVersion) {
         Write-Warning "$($key[0].DisplayName) v20$($key[0].DisplayVersion) installed."
         Write-Warning "This package installs v$env:ChocolateyPackageVersion and cannot replace a newer version."
         Throw 'Installation halted.'
      }
      else {
         $UpdateOnly = $true
      }
   }
}
elseif ($key.count -gt 1) {
   Write-Warning "$($key.Count) matching installs of Adobe Acrobat Reader DC found!"
   Write-Warning 'To prevent accidental data loss, this install will be aborted.'
   Write-Warning 'The following installs were found:'
   $key | ForEach-Object { Write-Warning "- $($_.DisplayName)`t$($_.DisplayVersion)" }
   Throw 'Installation halted.'
}

if ($PackageParameters.OverwriteInstallation) {
   Write-Host 'Uninstalling single language version.'
   $UninstallRegKey = [array](Get-UninstallRegistryKey "Adobe Acrobat Reader DC*")[0].UninstallString.split("/I")[2]
   $MSIArgs = @(
      "/x"
      '"{0}"' 
      "/qn"
   ) -f $UninstallRegKey
   Start-Process "msiexec.exe" -ArgumentList $MSIArgs -Wait
   $Uninstalled = $?
   $RegPath = 'HKLM:\SOFTWARE\Policies\Adobe\Acrobat Reader\DC\FeatureLockDown'

   if (Test-Path $RegPath) {
      $key = Get-ItemProperty -path $RegPath
      if ($key.bUpdater -ne $null) {
         $null = Remove-ItemProperty -Path $RegPath -Name 'bUpdater' -Force
      }
   }

   if ($Uninstalled) {
      Write-Host "Successfully uninstalled existing Adobe Acrobat Reader."
   }
   else {
      Throw "Failed to uninstall existing version of Adobe Acrobat Reader."
   }
}

$options = ' DISABLEDESKTOPSHORTCUT=1'
if ($PackageParameters.DesktopIcon) {
   $options = ''
   Write-Host 'You requested a desktop icon.' -ForegroundColor Cyan
}

if ($PackageParameters.NoUpdates) {
   $RegRoot = 'HKLM:\SOFTWARE\Policies'
   $RegSubFolders = ('Adobe\Acrobat Reader\DC\FeatureLockDown').split('\')
   for ($i = 0; $i -lt $RegSubFolders.count; $i++) {
      $RegPath = "$RegRoot\$($RegSubFolders[0..$i] -join '\')"
      if (-not (Test-Path $RegPath)) {
         $null = New-Item -Path $RegPath.TrimEnd($RegSubFolders[$i]) -Name $RegSubFolders[$i]
      }
   }
   $RegPath = "$RegRoot\$($RegSubFolders -join '\')"
   if (Test-Path $RegPath) {
      $null = New-ItemProperty -Path $RegPath -Name 'bUpdater' -PropertyType DWORD -Value 0 -Force
   }
   Write-Host 'You requested no Adobe updates.' -ForegroundColor Cyan
}

if ($PackageParameters.EnableUpdateService) {
   Write-Host 'You requested to enable the auto-update service.' -ForegroundColor Cyan
   if ($MUIinstalled) {
      if (Get-Service -Name 'AdobeARMservice' -ErrorAction SilentlyContinue) {
         $null = Set-Service -Name 'AdobeARMservice' -StartupType Automatic
         $null = Start-Service -Name 'AdobeARMservice'
      }
      else {
         Write-Warning 'The Adobe ARM update service is not available and is not installed on updates.'
      }
   }
}
else {
   $options += ' DISABLE_ARM_SERVICE_INSTALL=1'
   if (Get-Service -Name 'AdobeARMservice' -ErrorAction SilentlyContinue) {
      $null = Stop-Service -Name 'AdobeARMservice' -Force
      $null = Set-Service -Name 'AdobeARMservice' -StartupType Disabled
   }
}

if (-not $PackageParameters.UpdateMode) {
   $UpdateMode = 0
}
else { $UpdateMode = $PackageParameters.UpdateMode }

if ((0..4) -contains $UpdateMode) {
   Switch ($UpdateMode) {
      0 { Write-Host 'Configuring manual update checks and installs.' -ForegroundColor Cyan }
      1 { Write-Host 'You requested manual update checks and installs.' -ForegroundColor Cyan }
      2 { Write-Host 'You requested automatic update downloads and manual installs.' -ForegroundColor Cyan }
      3 { Write-Host 'You requested scheduled, automatic updates.' -ForegroundColor Cyan }
      4 { Write-Host 'You requested notifications but manual updates.' -ForegroundColor Cyan }
   }
   if ($MUIinstalled) {
      # This is the official setting based on the reference URL.
      $RegPath1 = 'HKLM:\SOFTWARE\Adobe\Adobe ARM\1.0\ARM\'
      if (Test-Path $RegPath1) {
         $null = New-ItemProperty -Path $RegPath1 -Name 'iCheckReader' -Value $UpdateMode -force
      }
      $GUID = '{' + $key[0].UninstallString.split('{')[-1]
      # This is the setting that actually causes a change in behavior.
      $RegPath2 = "HKLM:\SOFTWARE\Wow6432Node\Adobe\Adobe ARM\Legacy\Reader\$GUID"
      if (Test-Path $RegPath2) {
         $null = New-ItemProperty -Path $RegPath2 -Name 'Mode' -Value $UpdateMode -force
      }
   }
   else {
      $options += " UPDATE_MODE=$UpdateMode"
   }
}

$DownloadArgs = @{
   packageName         = "$env:ChocolateyPackageName (update)"
   FileFullPath        = Join-Path $env:TEMP "$env:ChocolateyPackageName.$env:ChocolateyPackageVersion.msp"
   url                 = $MUImspURL
   checksum            = $MUImspChecksum
   checksumType        = 'SHA512'
   GetOriginalFileName = $true
}
$mspPath = Get-ChocolateyWebFileCmdlet @DownloadArgs

if ($UpdateOnly) {
   $UpdateArgs = @{
      Statements     = "/p `"$mspPath`" /norestart /quiet ALLUSERS=1 EULA_ACCEPT=YES $options" +
      " /L*v `"$env:TEMP\$env:chocolateyPackageName.$env:chocolateyPackageVersion.Update.log`""
      ExetoRun       = 'msiexec.exe'
      validExitCodes = @(0, 1603)
   }
   $exitCode = Start-ChocolateyProcessAsAdmin @UpdateArgs

   if ($exitCode -eq 1603) {
      Write-Warning "For code 1603, Adobe recommends to 'shut down Microsoft Office and all web browsers' and try again."
      Write-Warning 'The update log should provide more details about the encountered issue:'
      Write-Warning "   $env:TEMP\$env:chocolateyPackageName.$env:chocolateyPackageVersion.Update.log"
      Throw "Patching of $env:ChocolateyPackageName to the latest version was unsuccessful."
   }
}
else {
   $DownloadArgs = @{
      packageName         = $env:ChocolateyPackageName
      FileFullPath        = Join-Path $env:TEMP "$env:ChocolateyPackageName.$env:ChocolateyPackageVersion.installer.exe"
      url                 = $MUIurl
      checksum            = $MUIchecksum
      checksumType        = 'SHA256'
      GetOriginalFileName = $true
   }
   $MUIexePath = Get-ChocolateyWebFileCmdlet @DownloadArgs

   $packageArgsEXE = @{
      packageName    = "$env:ChocolateyPackageName (installer)"
      fileType       = 'EXE'
      File           = $MUIexePath
      checksumType   = 'SHA256'
      silentArgs     = "/sAll /msi /norestart /quiet PATCH=`"$mspPath`" ALLUSERS=1 EULA_ACCEPT=YES $options" +
      " /L*v `"$env:TEMP\$env:chocolateyPackageName.$env:chocolateyPackageVersion.Install.log`""
      validExitCodes = @(0, 1000, 1101, 1603)
   }
   $exitCode = Install-ChocolateyInstallPackageCmdlet @packageArgsEXE

   if ($exitCode -eq 1603) {
      Write-Warning "For code 1603, Adobe recommends to 'shut down Microsoft Office and all web browsers' and try again."
      Write-Warning 'The install log should provide more details about the encountered issue:'
      Write-Warning "   $env:TEMP\$env:chocolateyPackageName.$env:chocolateyPackageVersion.Install.log"
      Throw "Installation of $env:ChocolateyPackageName was unsuccessful."
   }
}

if ($PackageParameters.NoUpdates -or $UpdateMode -lt 2) {
   Unregister-ScheduledTask 'Adobe Acrobat Update Task' -Confirm:$false -ErrorAction SilentlyContinue
}

2022-01-19 18:05:23,971 5056 [DEBUG] - Calling built-in PowerShell host with ['[System.Threading.Thread]::CurrentThread.CurrentCulture = '';[System.Threading.Thread]::CurrentThread.CurrentUICulture = ''; & import-module -name 'C:\ProgramData\chocolatey\helpers\chocolateyInstaller.psm1'; & 'C:\ProgramData\chocolatey\helpers\chocolateyScriptRunner.ps1' -packageScript 'C:\ProgramData\chocolatey\lib\adobereader\tools\chocolateyinstall.ps1' -installArguments '' -packageParameters ''']
2022-01-19 18:05:24,003 5056 [DEBUG] - Redirecting System.Management.Automation.resources, Version=3.0.0.0, Culture=de-DE, PublicKeyToken=31bf3856ad364e35, requested by ''
2022-01-19 18:05:29,128 5056 [DEBUG] - Host version is 5.1.17763.1, PowerShell Version is '5.1.17763.2268' and CLR Version is '4.0.30319.42000'.
2022-01-19 18:05:30,175 5056 [DEBUG] - Importing 'C:\ProgramData\chocolatey\helpers\..\extensions\chocolatey\chocolatey.licensed.dll'
2022-01-19 18:05:30,175 5056 [DEBUG] - Loading 'chocolatey.licensed' extension
2022-01-19 18:05:30,409 5056 [DEBUG] - Loading community extensions
2022-01-19 18:05:30,503 5056 [DEBUG] - Importing 'C:\ProgramData\chocolatey\extensions\chocolatey\chocolatey.extensions.psm1'
2022-01-19 18:05:30,503 5056 [INFO ] - VERBOSE: Loading module from path 'C:\ProgramData\chocolatey\extensions\chocolatey\chocolatey.extensions.psm1'.
2022-01-19 18:05:30,518 5056 [DEBUG] - Loading 'chocolatey.licensed' extension.
2022-01-19 18:05:30,534 5056 [INFO ] - VERBOSE: Loading module from path 'C:\ProgramData\chocolatey\extensions\chocolatey\chocolatey.licensed.dll'.
2022-01-19 18:05:30,628 5056 [DEBUG] - License type set to Business
2022-01-19 18:05:31,128 5056 [DEBUG] - ---------------------------Script Execution---------------------------
2022-01-19 18:05:31,128 5056 [DEBUG] - Running 'ChocolateyScriptRunner' for adobereader v2021.011.20039 with packageScript 'C:\ProgramData\chocolatey\lib\adobereader\tools\chocolateyinstall.ps1', packageFolder:'C:\ProgramData\chocolatey\lib\adobereader', installArguments: '', packageParameters: '',
2022-01-19 18:05:31,143 5056 [DEBUG] - Running 'C:\ProgramData\chocolatey\lib\adobereader\tools\chocolateyinstall.ps1'
2022-01-19 18:05:31,331 5056 [DEBUG] - Running licensed 'Invoke-ValidateChocolateyLicense' with RequiredLicenseTypes:'Business,ManagedServiceProvider,BusinessTrial'
2022-01-19 18:05:31,456 5056 [DEBUG] - Validating license against license types 'Business,ManagedServiceProvider,BusinessTrial'.
2022-01-19 18:05:31,456 5056 [DEBUG] - Invoke-ValidateChocolateyLicense complete. If there were no reported errors, validation was successful.
2022-01-19 18:05:31,612 5056 [DEBUG] - Running Get-UninstallRegistryKey -softwareName 'Adobe Acrobat Reader DC*' 
2022-01-19 18:05:31,628 5056 [INFO ] - VERBOSE: Retrieving all uninstall registry keys
2022-01-19 18:05:32,096 5056 [DEBUG] - Registry uninstall keys on system: 30
2022-01-19 18:05:32,096 5056 [DEBUG] - Error handling check: 'Get-ItemProperty' fails if a registry key is encoded incorrectly.
2022-01-19 18:05:32,237 5056 [WARN ] - WARNING: No registry key found based on  'Adobe Acrobat Reader DC*'
2022-01-19 18:05:32,253 5056 [DEBUG] - Found 0 uninstall registry key(s) with SoftwareName:'Adobe Acrobat Reader DC*'
2022-01-19 18:05:32,284 5056 [INFO ] - True
2022-01-19 18:05:32,378 5056 [DEBUG] - Running Get-PackageParameters 
2022-01-19 18:05:32,378 5056 [DEBUG] - Parsing $env:ChocolateyPackageParameters and $env:ChocolateyPackageParametersSensitive for parameters
2022-01-19 18:05:32,534 5056 [INFO ] - Configuring manual update checks and installs.
2022-01-19 18:05:32,581 5056 [DEBUG] - Running licensed 'Get-ChocolateyWebFile' for adobereader (update) with  FileFullPath: 'C:\Users\Administrator\AppData\Local\Temp\1\chocolatey\adobereader.2021.011.20039.msp' Url: 'C:\ProgramData\chocolatey\lib\adobereader\tools\files\AcroRdrDCUpd2101120039_MUI.msp', Url64Bit: '', Checksum: '8a854f2bd07229cb43901f7cec8755b8dde9eeea5671230cc573970ced299f687af5d22b3c962e454058d09bf6edeb8448aacb56f6fb1bf65ef9017a9b875d61', ChecksumType: 'SHA512',  Checksum64: '', ChecksumType64: '', GetOriginalFileName: 'True', ForceDownload: 'False'
2022-01-19 18:05:32,721 5056 [DEBUG] - CPU is 64 bit
2022-01-19 18:05:32,753 5056 [DEBUG] - Running licensed 'Get-WebFileName' with url:'C:\ProgramData\chocolatey\lib\adobereader\tools\files\AcroRdrDCUpd2101120039_MUI.msp', defaultName:'adobereader.2021.011.20039.msp' userAgent:'chocolatey command line'
2022-01-19 18:05:32,893 5056 [DEBUG] - Url is local file, returning fileName.
2022-01-19 18:05:32,909 5056 [INFO ] - Copying adobereader (update)
  from 'C:\ProgramData\chocolatey\lib\adobereader\tools\files\AcroRdrDCUpd2101120039_MUI.msp'
2022-01-19 18:05:35,144 5056 [DEBUG] - Running licensed 'Get-VirusCheckValid' with url:'C:\ProgramData\chocolatey\lib\adobereader\tools\files\AcroRdrDCUpd2101120039_MUI.msp', file: 'C:\Users\Administrator\AppData\Local\Temp\1\chocolatey\AcroRdrDCUpd2101120039_MUI.msp'
2022-01-19 18:05:35,284 5056 [INFO ] - Virus checking skipped/turned off. Not verifying 'AcroRdrDCUpd2101120039_MUI.msp'
2022-01-19 18:05:35,300 5056 [DEBUG] - Verifying package provided checksum of '8a854f2bd07229cb43901f7cec8755b8dde9eeea5671230cc573970ced299f687af5d22b3c962e454058d09bf6edeb8448aacb56f6fb1bf65ef9017a9b875d61' for 'C:\Users\Administrator\AppData\Local\Temp\1\chocolatey\AcroRdrDCUpd2101120039_MUI.msp'.
2022-01-19 18:05:35,315 5056 [DEBUG] - Running licensed 'Get-ChecksumValid' with file: 'C:\Users\Administrator\AppData\Local\Temp\1\chocolatey\AcroRdrDCUpd2101120039_MUI.msp', checksum: '8a854f2bd07229cb43901f7cec8755b8dde9eeea5671230cc573970ced299f687af5d22b3c962e454058d09bf6edeb8448aacb56f6fb1bf65ef9017a9b875d61', checksumType: 'SHA512', originalUrl: 'C:\ProgramData\chocolatey\lib\adobereader\tools\files\AcroRdrDCUpd2101120039_MUI.msp'
2022-01-19 18:05:35,315 5056 [DEBUG] - Checksums not being ignored, continuing to validate checksum.
2022-01-19 18:05:35,456 5056 [DEBUG] - Checksum tool found at 'C:\ProgramData\chocolatey\tools\checksum.exe'
2022-01-19 18:05:35,456 5056 [DEBUG] - Executing command ['C:\ProgramData\chocolatey\tools\checksum.exe' -c="8a854f2bd07229cb43901f7cec8755b8dde9eeea5671230cc573970ced299f687af5d22b3c962e454058d09bf6edeb8448aacb56f6fb1bf65ef9017a9b875d61" -t="SHA512" -f="C:\Users\Administrator\AppData\Local\Temp\1\chocolatey\AcroRdrDCUpd2101120039_MUI.msp"]
2022-01-19 18:05:35,472 5056 [DEBUG] - Calling command ['"C:\ProgramData\chocolatey\tools\checksum.exe" -c="8a854f2bd07229cb43901f7cec8755b8dde9eeea5671230cc573970ced299f687af5d22b3c962e454058d09bf6edeb8448aacb56f6fb1bf65ef9017a9b875d61" -t="SHA512" -f="C:\Users\Administrator\AppData\Local\Temp\1\chocolatey\AcroRdrDCUpd2101120039_MUI.msp"']
2022-01-19 18:05:35,535 5056 [ERROR] - ERROR: Der Verzeichnisname ist ung�ltig
2022-01-19 18:05:35,612 5056 [DEBUG] - Built-in PowerShell host called with ['[System.Threading.Thread]::CurrentThread.CurrentCulture = '';[System.Threading.Thread]::CurrentThread.CurrentUICulture = ''; & import-module -name 'C:\ProgramData\chocolatey\helpers\chocolateyInstaller.psm1'; & 'C:\ProgramData\chocolatey\helpers\chocolateyScriptRunner.ps1' -packageScript 'C:\ProgramData\chocolatey\lib\adobereader\tools\chocolateyinstall.ps1' -installArguments '' -packageParameters '''] exited with '-1'.
2022-01-19 18:05:35,612 5056 [DEBUG] - Calling command ['"C:\windows\System32\shutdown.exe" /a']
2022-01-19 18:05:35,737 5056 [DEBUG] - Command ['"C:\windows\System32\shutdown.exe" /a'] exited with '1116'
2022-01-19 18:05:35,940 5056 [DEBUG] - Capturing package files in 'C:\ProgramData\chocolatey\lib\adobereader'
2022-01-19 18:05:37,237 5056 [DEBUG] -  Found 'C:\ProgramData\chocolatey\lib\adobereader\adobereader.nupkg'
  with checksum 'BFE93D3EA1D774B8DD5F4040B7554113'
2022-01-19 18:05:37,237 5056 [DEBUG] -  Found 'C:\ProgramData\chocolatey\lib\adobereader\adobereader.nuspec'
  with checksum '9DD7A031BAB68B5F9A0FEBE02BEEF0EC'
2022-01-19 18:05:37,237 5056 [DEBUG] -  Found 'C:\ProgramData\chocolatey\lib\adobereader\tools\chocolateyinstall.ps1'
  with checksum 'B36DC8D3426542B7781A09BA7B312E20'
2022-01-19 18:05:37,237 5056 [DEBUG] -  Found 'C:\ProgramData\chocolatey\lib\adobereader\tools\chocolateyuninstall.ps1'
  with checksum 'D5A758BAF15CCE8051D6F7A35A3BC717'
2022-01-19 18:05:38,081 5056 [DEBUG] -  Found 'C:\ProgramData\chocolatey\lib\adobereader\tools\files\AcroRdrDC1500720033_MUI.exe'
  with checksum '56622CBE4CC4B093C9BA33D5A94F0C48'
2022-01-19 18:05:38,096 5056 [DEBUG] -  Found 'C:\ProgramData\chocolatey\lib\adobereader\tools\files\AcroRdrDC1500720033_MUI.exe.ignore'
  with checksum 'ECAA88F7FA0BF610A5A26CF545DCD3AA'
2022-01-19 18:05:39,018 5056 [DEBUG] -  Found 'C:\ProgramData\chocolatey\lib\adobereader\tools\files\AcroRdrDCUpd2101120039_MUI.msp'
  with checksum 'EBAA3E614B720F158672A10C847B8E3D'
2022-01-19 18:05:39,018 5056 [DEBUG] -  Found 'C:\ProgramData\chocolatey\lib\adobereader\tools\files\AcroRdrDCUpd2101120039_MUI.msp.ignore'
  with checksum 'ECAA88F7FA0BF610A5A26CF545DCD3AA'
2022-01-19 18:05:39,065 5056 [INFO ] -  Reducing package size for 'adobereader'...
2022-01-19 18:05:39,112 5056 [DEBUG] - Attempting to create directory "C:\Users\Administrator\AppData\Local\Temp\1\chocolatey\ChocolateyPackageCache\PackageCache_20220119_180539_0656".
2022-01-19 18:05:39,128 5056 [DEBUG] - Attempting to copy "C:\ProgramData\chocolatey\lib\adobereader\adobereader.nuspec"
 to "C:\Users\Administrator\AppData\Local\Temp\1\chocolatey\ChocolateyPackageCache\PackageCache_20220119_180539_0656\adobereader.nuspec".
2022-01-19 18:05:40,143 5056 [INFO ] -  Reducing nupkg file size ('adobereader').
2022-01-19 18:05:40,425 5056 [INFO ] -  Reducing extracted archives and installers ('adobereader').
2022-01-19 18:05:40,440 5056 [INFO ] -  Removing 'C:\ProgramData\chocolatey\lib\adobereader\tools\files\AcroRdrDCUpd2101120039_MUI.msp' ('adobereader').
2022-01-19 18:05:40,440 5056 [DEBUG] - Attempting to delete file "C:\ProgramData\chocolatey\lib\adobereader\tools\files\AcroRdrDCUpd2101120039_MUI.msp".
2022-01-19 18:05:40,518 5056 [DEBUG] - Attempting to detect type for 'AcroRdrDC1500720033_MUI.exe' with db 'C:\ProgramData\chocolatey\tools\detector\db'
2022-01-19 18:05:46,346 5056 [DEBUG] - fileTypeOutput='PE: Nothing found'
2022-01-19 18:05:46,362 5056 [INFO ] -  Space reduced for 'adobereader': 489,33 MB.
2022-01-19 18:05:46,362 5056 [DEBUG] - Attempting to delete file "C:\ProgramData\chocolatey\lib\adobereader\adobereader.nupkg.bkp".
2022-01-19 18:05:46,612 5056 [DEBUG] - Attempting to create directory "C:\ProgramData\chocolatey\.chocolatey\adobereader.2021.011.20039".
2022-01-19 18:05:46,628 5056 [DEBUG] - There was no original file at 'C:\ProgramData\chocolatey\.chocolatey\adobereader.2021.011.20039\.files'
2022-01-19 18:05:46,643 5056 [DEBUG] - Attempting to delete file "C:\ProgramData\chocolatey\.chocolatey\adobereader.2021.011.20039\.arguments".
2022-01-19 18:05:46,643 5056 [DEBUG] - Attempting to delete file "C:\ProgramData\chocolatey\.chocolatey\adobereader.2021.011.20039\.version".
2022-01-19 18:05:46,643 5056 [DEBUG] - Attempting to delete file "C:\ProgramData\chocolatey\.chocolatey\adobereader.2021.011.20039\.sxs".
2022-01-19 18:05:46,643 5056 [DEBUG] - Attempting to delete file "C:\ProgramData\chocolatey\.chocolatey\adobereader.2021.011.20039\.pin".
2022-01-19 18:05:46,659 5056 [DEBUG] - Sending message 'HandlePackageResultCompletedMessage' out if there are subscribers...
2022-01-19 18:05:46,659 5056 [ERROR] - The install of adobereader was NOT successful.
2022-01-19 18:05:46,674 5056 [ERROR] - Error while running 'C:\ProgramData\chocolatey\lib\adobereader\tools\chocolateyinstall.ps1'.
 See log for details.
2022-01-19 18:05:46,674 5056 [DEBUG] - Attempting to create directory "C:\ProgramData\chocolatey\lib-bad".
2022-01-19 18:05:46,674 5056 [DEBUG] - Moving 'C:\ProgramData\chocolatey\lib\adobereader'
 to 'C:\ProgramData\chocolatey\lib-bad\adobereader'
2022-01-19 18:05:48,706 5056 [DEBUG] - Attempting to delete file "C:\Users\Administrator\AppData\Local\NuGet\Cache\adobereader.2021.011.20039.nupkg".
2022-01-19 18:05:48,846 5056 [WARN ] - 
Chocolatey installed 0/1 packages. 1 packages failed.

Internal package:

2022-01-19 18:28:11,801 1968 [DEBUG] - _ Chocolatey:ProChocolateyInstallCommand - Normal Run Mode _
2022-01-19 18:28:11,832 1968 [INFO ] - Installing the following packages:
2022-01-19 18:28:11,863 1968 [INFO ] - PSIwms_vgtcl_denby_tst
2022-01-19 18:28:11,863 1968 [INFO ] - By installing, you accept licenses for the packages.
2022-01-19 18:28:11,910 1968 [DEBUG] - Switching source name TCL to actual source value 'https://nexus.tclan.technocargo.de:8082/repository/Choco/'.
2022-01-19 18:28:12,379 1968 [DEBUG] - Resolving reference to chocolatey.licensed...
2022-01-19 18:28:12,598 1968 [DEBUG] - Using 'https://nexus.tclan.technocargo.de:8082/repository/Choco/'.
2022-01-19 18:28:13,973 1968 [DEBUG] - - Supports prereleases? 'True'.
2022-01-19 18:28:13,973 1968 [DEBUG] - - Is ServiceBased? 'True'.
2022-01-19 18:28:14,582 1968 [DEBUG] - Package 'psiwms_vgtcl_denby_tst' found on source 'https://nexus.tclan.technocargo.de:8082/repository/Choco/'
2022-01-19 18:29:09,474 1968 [INFO ] - [NuGet] Installing 'PSIwms_vgtcl_denby_tst 1.1.8.0'.
2022-01-19 18:29:09,489 1968 [DEBUG] - [NuGet] Added file 'PSIwms_vgtcl_denby_tst.nuspec.bak' to folder 'PSIwms_vgtcl_denby_tst'.
2022-01-19 18:29:09,505 1968 [DEBUG] - [NuGet] Added file 'chocolateyInstall.ps1' to folder 'PSIwms_vgtcl_denby_tst\source'.
2022-01-19 18:29:13,145 1968 [DEBUG] - [NuGet] Added file 'psi_vgtcl_denby_tst.zip' to folder 'PSIwms_vgtcl_denby_tst\source'.
2022-01-19 18:29:16,830 1968 [DEBUG] - [NuGet] Added file 'PSIwms_vgtcl_denby_tst.nupkg' to folder 'PSIwms_vgtcl_denby_tst'.
2022-01-19 18:29:17,158 1968 [DEBUG] - [NuGet] Added file 'PSIwms_vgtcl_denby_tst.nuspec' to folder 'PSIwms_vgtcl_denby_tst'.
2022-01-19 18:29:17,158 1968 [INFO ] - [NuGet] Successfully installed 'PSIwms_vgtcl_denby_tst 1.1.8.0'.
2022-01-19 18:29:17,174 1968 [INFO ] - 
PSIwms_vgtcl_denby_tst v1.1.8.0
2022-01-19 18:29:17,205 1968 [INFO ] - psiwms_vgtcl_denby_tst package files install completed. Performing other installation steps.
2022-01-19 18:29:17,502 1968 [DEBUG] - Setting installer args for PSIwms_vgtcl_denby_tst
2022-01-19 18:29:17,502 1968 [DEBUG] - Setting package parameters for PSIwms_vgtcl_denby_tst
2022-01-19 18:29:17,502 1968 [DEBUG] - Contents of 'C:\ProgramData\chocolatey\lib\PSIwms_vgtcl_denby_tst\source\chocolateyInstall.ps1':
2022-01-19 18:29:17,533 1968 [DEBUG] - $ErrorActionPreference = 'Stop'
$packageName    = 'PSIwms_vgtcl_denby_tst'
$softwareName   = 'PSIwms_vgtcl_denby_tst'
$toolsDir       = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
$url            = ''
$checksum       = ''
$silentArgs     = '/S'
$validExitCodes = @(0,1)
$fileLocation = Join-Path $toolsDir 'psi_vgtcl_denby_tst.zip'

$packageArgs = @{
  packageName    = $packageName
  Destination    = 'c:\'
  FileFullPath   = $fileLocation
}

Get-ChocolateyUnzip @packageArgs

#Install-ChocolateyShortcut -ShortcutFilePath "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\PSI vgtcl_denby_test.lnk" -TargetPath "C:\psi\vgtcl_denby_test.bat" -IconLocation "C:\psi\app\vgtcl_denby_tst\dialog\cltpjf\PSIwms.ico"
#Install-ChocolateyShortcut -ShortcutFilePath "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\PSI vgtcl_denby_sputest.lnk" -TargetPath "C:\psi\vgtcl_denby_sputest.bat" -IconLocation "C:\psi\app\vgtcl_denby_tst\dialog\cltpjf\PSIwms.ico"

Remove-Item $fileLocation | out-null

2022-01-19 18:29:17,674 1968 [DEBUG] - Calling built-in PowerShell host with ['[System.Threading.Thread]::CurrentThread.CurrentCulture = '';[System.Threading.Thread]::CurrentThread.CurrentUICulture = ''; & import-module -name 'C:\ProgramData\chocolatey\helpers\chocolateyInstaller.psm1'; & 'C:\ProgramData\chocolatey\helpers\chocolateyScriptRunner.ps1' -packageScript 'C:\ProgramData\chocolatey\lib\PSIwms_vgtcl_denby_tst\source\chocolateyInstall.ps1' -installArguments '' -packageParameters ''']
2022-01-19 18:29:17,720 1968 [DEBUG] - Redirecting System.Management.Automation.resources, Version=3.0.0.0, Culture=de-DE, PublicKeyToken=31bf3856ad364e35, requested by ''
2022-01-19 18:29:23,111 1968 [DEBUG] - Host version is 5.1.17763.1, PowerShell Version is '5.1.17763.2268' and CLR Version is '4.0.30319.42000'.
2022-01-19 18:29:24,283 1968 [DEBUG] - Importing 'C:\ProgramData\chocolatey\helpers\..\extensions\chocolatey\chocolatey.licensed.dll'
2022-01-19 18:29:24,283 1968 [DEBUG] - Loading 'chocolatey.licensed' extension
2022-01-19 18:29:24,517 1968 [DEBUG] - Loading community extensions
2022-01-19 18:29:24,596 1968 [DEBUG] - Importing 'C:\ProgramData\chocolatey\extensions\chocolatey\chocolatey.extensions.psm1'
2022-01-19 18:29:24,611 1968 [INFO ] - VERBOSE: Loading module from path 'C:\ProgramData\chocolatey\extensions\chocolatey\chocolatey.extensions.psm1'.
2022-01-19 18:29:24,627 1968 [DEBUG] - Loading 'chocolatey.licensed' extension.
2022-01-19 18:29:24,642 1968 [INFO ] - VERBOSE: Loading module from path 'C:\ProgramData\chocolatey\extensions\chocolatey\chocolatey.licensed.dll'.
2022-01-19 18:29:24,752 1968 [DEBUG] - License type set to Business
2022-01-19 18:29:25,346 1968 [DEBUG] - ---------------------------Script Execution---------------------------
2022-01-19 18:29:25,346 1968 [DEBUG] - Running 'ChocolateyScriptRunner' for PSIwms_vgtcl_denby_tst v1.1.8.0 with packageScript 'C:\ProgramData\chocolatey\lib\PSIwms_vgtcl_denby_tst\source\chocolateyInstall.ps1', packageFolder:'C:\ProgramData\chocolatey\lib\PSIwms_vgtcl_denby_tst', installArguments: '', packageParameters: '',
2022-01-19 18:29:25,361 1968 [DEBUG] - Running 'C:\ProgramData\chocolatey\lib\PSIwms_vgtcl_denby_tst\source\chocolateyInstall.ps1'
2022-01-19 18:29:25,439 1968 [DEBUG] - Running licensed 'Get-ChocolateyUnzip' with FileFullPath:'C:\ProgramData\chocolatey\lib\PSIwms_vgtcl_denby_tst\source\psi_vgtcl_denby_tst.zip', Destination:'c:\', SpecificFolder:'', PackageName:'PSIwms_vgtcl_denby_tst', FileFullPath64:''.
2022-01-19 18:29:25,580 1968 [DEBUG] - 7zip found at 'C:\ProgramData\chocolatey\tools\7z.exe'
2022-01-19 18:29:25,580 1968 [INFO ] - Extracting psi_vgtcl_denby_tst.zip to c:\...
2022-01-19 18:29:25,596 1968 [DEBUG] - Executing command ['C:\ProgramData\chocolatey\tools\7z.exe' x -aoa -bd -bb1 -o"c:\" -y "C:\ProgramData\chocolatey\lib\PSIwms_vgtcl_denby_tst\source\psi_vgtcl_denby_tst.zip"]
2022-01-19 18:29:25,611 1968 [DEBUG] - Calling command ['"C:\ProgramData\chocolatey\tools\7z.exe" x -aoa -bd -bb1 -o"c:\" -y "C:\ProgramData\chocolatey\lib\PSIwms_vgtcl_denby_tst\source\psi_vgtcl_denby_tst.zip"']
2022-01-19 18:29:25,689 1968 [ERROR] - ERROR: Der Verzeichnisname ist ung�ltig
2022-01-19 18:29:25,783 1968 [DEBUG] - Built-in PowerShell host called with ['[System.Threading.Thread]::CurrentThread.CurrentCulture = '';[System.Threading.Thread]::CurrentThread.CurrentUICulture = ''; & import-module -name 'C:\ProgramData\chocolatey\helpers\chocolateyInstaller.psm1'; & 'C:\ProgramData\chocolatey\helpers\chocolateyScriptRunner.ps1' -packageScript 'C:\ProgramData\chocolatey\lib\PSIwms_vgtcl_denby_tst\source\chocolateyInstall.ps1' -installArguments '' -packageParameters '''] exited with '-1'.
2022-01-19 18:29:25,783 1968 [DEBUG] - Calling command ['"C:\windows\System32\shutdown.exe" /a']
2022-01-19 18:29:25,924 1968 [DEBUG] - Command ['"C:\windows\System32\shutdown.exe" /a'] exited with '1116'
2022-01-19 18:29:26,205 1968 [DEBUG] - Capturing package files in 'C:\ProgramData\chocolatey\lib\PSIwms_vgtcl_denby_tst'
2022-01-19 18:29:28,705 1968 [DEBUG] -  Found 'C:\ProgramData\chocolatey\lib\PSIwms_vgtcl_denby_tst\PSIwms_vgtcl_denby_tst.nupkg'
  with checksum '7B70A768A66B653F9357FC72C53A81BC'
2022-01-19 18:29:28,721 1968 [DEBUG] -  Found 'C:\ProgramData\chocolatey\lib\PSIwms_vgtcl_denby_tst\PSIwms_vgtcl_denby_tst.nuspec'
  with checksum 'B1E8842AA19B5BCDA8781F82349D47F7'
2022-01-19 18:29:28,721 1968 [DEBUG] -  Found 'C:\ProgramData\chocolatey\lib\PSIwms_vgtcl_denby_tst\PSIwms_vgtcl_denby_tst.nuspec.bak'
  with checksum '47CE1953C2CDEC03B569C49B6C7DA581'
2022-01-19 18:29:28,721 1968 [DEBUG] -  Found 'C:\ProgramData\chocolatey\lib\PSIwms_vgtcl_denby_tst\source\chocolateyInstall.ps1'
  with checksum 'B826D249C534817030BBD7FE46C7B302'
2022-01-19 18:29:31,346 1968 [DEBUG] -  Found 'C:\ProgramData\chocolatey\lib\PSIwms_vgtcl_denby_tst\source\psi_vgtcl_denby_tst.zip'
  with checksum '2E92D4FDEC30FA1B938170E17C5CC038'
2022-01-19 18:29:31,392 1968 [WARN ] - Directory 'C:\ProgramData\chocolatey\lib\PSIwms_vgtcl_denby_tst\tools' does not exist.
2022-01-19 18:29:31,392 1968 [INFO ] -  Reducing package size for 'PSIwms_vgtcl_denby_tst'...
2022-01-19 18:29:31,424 1968 [DEBUG] - Attempting to create directory "C:\Users\Administrator\AppData\Local\Temp\1\chocolatey\ChocolateyPackageCache\PackageCache_20220119_182931_3773".
2022-01-19 18:29:31,424 1968 [DEBUG] - Attempting to copy "C:\ProgramData\chocolatey\lib\PSIwms_vgtcl_denby_tst\PSIwms_vgtcl_denby_tst.nuspec"
 to "C:\Users\Administrator\AppData\Local\Temp\1\chocolatey\ChocolateyPackageCache\PackageCache_20220119_182931_3773\PSIwms_vgtcl_denby_tst.nuspec".
2022-01-19 18:29:32,382 1968 [INFO ] -  Reducing nupkg file size ('PSIwms_vgtcl_denby_tst').
2022-01-19 18:29:32,679 1968 [WARN ] - Directory 'C:\ProgramData\chocolatey\lib\PSIwms_vgtcl_denby_tst\tools' does not exist.
2022-01-19 18:29:32,679 1968 [INFO ] -  Reducing extracted archives and installers ('PSIwms_vgtcl_denby_tst').
2022-01-19 18:29:32,695 1968 [INFO ] -  Space reduced for 'PSIwms_vgtcl_denby_tst': 574,75 MB.
2022-01-19 18:29:32,695 1968 [DEBUG] - Attempting to delete file "C:\ProgramData\chocolatey\lib\PSIwms_vgtcl_denby_tst\PSIwms_vgtcl_denby_tst.nupkg.bkp".
2022-01-19 18:29:33,273 1968 [DEBUG] - Attempting to create directory "C:\ProgramData\chocolatey\.chocolatey\PSIwms_vgtcl_denby_tst.1.1.8.0".
2022-01-19 18:29:33,288 1968 [DEBUG] - There was no original file at 'C:\ProgramData\chocolatey\.chocolatey\PSIwms_vgtcl_denby_tst.1.1.8.0\.files'
2022-01-19 18:29:33,288 1968 [DEBUG] - Attempting to delete file "C:\ProgramData\chocolatey\.chocolatey\PSIwms_vgtcl_denby_tst.1.1.8.0\.arguments".
2022-01-19 18:29:33,304 1968 [DEBUG] - Attempting to delete file "C:\ProgramData\chocolatey\.chocolatey\PSIwms_vgtcl_denby_tst.1.1.8.0\.version".
2022-01-19 18:29:33,304 1968 [DEBUG] - Attempting to delete file "C:\ProgramData\chocolatey\.chocolatey\PSIwms_vgtcl_denby_tst.1.1.8.0\.sxs".
2022-01-19 18:29:33,304 1968 [DEBUG] - Attempting to delete file "C:\ProgramData\chocolatey\.chocolatey\PSIwms_vgtcl_denby_tst.1.1.8.0\.pin".
2022-01-19 18:29:33,304 1968 [DEBUG] - Sending message 'HandlePackageResultCompletedMessage' out if there are subscribers...
2022-01-19 18:29:33,320 1968 [ERROR] - The install of psiwms_vgtcl_denby_tst was NOT successful.
2022-01-19 18:29:33,320 1968 [ERROR] - Error while running 'C:\ProgramData\chocolatey\lib\PSIwms_vgtcl_denby_tst\source\chocolateyInstall.ps1'.
 See log for details.
2022-01-19 18:29:33,335 1968 [DEBUG] - Moving 'C:\ProgramData\chocolatey\lib\PSIwms_vgtcl_denby_tst'
 to 'C:\ProgramData\chocolatey\lib-bad\PSIwms_vgtcl_denby_tst'
2022-01-19 18:29:35,349 1968 [DEBUG] - Attempting to delete file "C:\Users\Administrator\AppData\Local\NuGet\Cache\PSIwms_vgtcl_denby_tst.1.1.8.0.nupkg".
2022-01-19 18:29:35,552 1968 [WARN ] - 
Chocolatey installed 0/1 packages. 1 packages failed.

References:

pauby commented 2 years ago

I've tried to replicate this with the adobereader package from the Chocolatey Community Repository, and I can't.

On Windows 10, I installed Chocolatey CLI 0.12.0, Chocolatey Licensed Extension 3.0.0, internalized abobereader and then installed the internalized version. Here is what I had installed:

PS C:\Users\WDAGUtilityAccount> choco list -lo
Chocolatey v0.12.0 Business
chocolatey 0.12.0
chocolatey.extension 3.0.0

Despite the bug in v3.0.0 of Chocolatey Licensed Extension, that you mentioned, the internalized version of adobereader installed without any issues.

PS C:\Users\WDAGUtilityAccount> choco install adobereader -s .
Chocolatey v0.12.0 Business
Installing the following packages:
adobereader
By installing, you accept licenses for the packages.

KB2919442 v1.0.20160915
kb2919442 package files install completed. Performing other installation steps.
Skipping installation because this hotfix only applies to Windows 8.1 and Windows Server 2012 R2.
 The install of kb2919442 was successful.
  Software install location not explicitly set, it could be in package or
  default install location of installer.

KB2919355 v1.0.20160915
kb2919355 package files install completed. Performing other installation steps.
Skipping installation because this hotfix only applies to Windows 8.1 and Windows Server 2012 R2.
 The install of kb2919355 was successful.
  Software install location not explicitly set, it could be in package or
  default install location of installer.

adobereader v2021.011.20039
adobereader package files install completed. Performing other installation steps.
WARNING: No registry key found based on  'Adobe Acrobat Reader DC*'
True
Configuring manual update checks and installs.
Copying adobereader (update)
  from 'C:\ProgramData\chocolatey\lib\adobereader\tools\files\AcroRdrDCUpd2101120039_MUI.msp'
Virus checking skipped/turned off. Not verifying 'AcroRdrDCUpd2101120039_MUI.msp'
Copying adobereader
  from 'C:\ProgramData\chocolatey\lib\adobereader\tools\files\AcroRdrDC1500720033_MUI.exe'
Virus checking skipped/turned off. Not verifying 'AcroRdrDC1500720033_MUI.exe'
Installing AcroRdrDC1500720033_MUI.exe...
AcroRdrDC1500720033_MUI.exe has been installed.
Progress: 100% - 2/2 completed                                                                                           adobereader may be able to be automatically uninstalled.
 The install of adobereader was successful.
  Software installed to 'C:\Program Files (x86)\Adobe\Acrobat Reader DC\'

Chocolatey installed 3/3 packages.
 See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).

I then started with a fresh Windows 10 sandbox and installed Chocolatey CLI 0.12.0, Chocolatey Licensed Extension 3.1.0, internalized abobereader and then installed the internalized version. Here is what I had installed:

PS C:\Users\WDAGUtilityAccount> choco list -lo
Chocolatey v0.12.0 Business
chocolatey 0.12.0
chocolatey.extension 3.1.0
2 packages installed.

I'm not going to post the logs of installing the internalized version with Chocolatey Licensed Extension 3.1.0 as it's exactly the same as for 3.0.0.

This is going to need some more investigation to see what the issue you are encountering is. Can I ask you to run choco support to see what your options are and raise a Support ticket?

FLeven commented 2 years ago

What about the unzip to c:\ , should have beend fixed in 3.1.0, but it isn't ?

Then something else has changed, as this runs in a MDT/SCCM task sequence and you are right, a manual install is surprisingly working.

Before I raise a ticket, all I can do is, add another restart after all c4b dependency's and agents are installed and hope it will work.

Also the time to install, chocolatey.extension, Agent etc. has almost doubled, are there any checks made to contact your servers ? What about Air-Gap systems, will there be timeouts if choco can't contact temelemtrie/license servers ?

pauby commented 2 years ago

What about the unzip to c:\ , should have beend fixed in 3.1.0, but it isn't ? Then something else has changed, as this runs in a MDT/SCCM task sequence and you are right, a manual install is surprisingly working.

This was fixed and was released with 3.1.0. The manual install works for both of us so if it wasn't fixed, it would fail there too.

Also the time to install, chocolatey.extension, Agent etc. has almost doubled, are there any checks made to contact your servers ? What about Air-Gap systems, will there be timeouts if choco can't contact temelemtrie/license servers ?

I hadn't noticed the time to install increasing when I did the test earlier. Are you using the /NoContextMenu parameter (e.g. choco install chocolatey.extension --params='"/NoContextMenu"') when you are installing on headless systems? Adding context menus does add to the installation time, but again this hasn't changed from previous versions.

If you have internalized Chocolatey Extension and Chocolatey, and installing it from your internal Nexus repository, then there would be no contact with any Chocolatey servers (for example the Chocolatey Community Repository). Chocolatey doesn't use license servers nor do we collect telemetry. In short, Chocolatey never 'phones' home and has an offline install) to work with air=gapped systems.

pauby commented 2 years ago
2022-01-19 18:05:35,472 5056 [DEBUG] - Calling command ['"C:\ProgramData\chocolatey\tools\checksum.exe" -c="8a854f2bd07229cb43901f7cec8755b8dde9eeea5671230cc573970ced299f687af5d22b3c962e454058d09bf6edeb8448aacb56f6fb1bf65ef9017a9b875d61" -t="SHA512" -f="C:\Users\Administrator\AppData\Local\Temp\1\chocolatey\AcroRdrDCUpd2101120039_MUI.msp"']
2022-01-19 18:05:35,535 5056 [ERROR] - ERROR: Der Verzeichnisname ist ung�ltig

This is the first point where the error appears and it appears that the checksum command cannot find C:\Users\Administrator\AppData\Local\Temp\1\chocolatey\AcroRdrDCUpd2101120039_MUI.msp

2022-01-19 18:29:25,611 1968 [DEBUG] - Calling command ['"C:\ProgramData\chocolatey\tools\7z.exe" x -aoa -bd -bb1 -o"c:" -y "C:\ProgramData\chocolatey\lib\PSIwms_vgtcl_denby_tst\source\psi_vgtcl_denby_tst.zip"']
2022-01-19 18:29:25,689 1968 [ERROR] - ERROR: Der Verzeichnisname ist ung�ltig

Here it looks like C:\ProgramData\chocolatey\lib\PSIwms_vgtcl_denby_tst\source\psi_vgtcl_denby_tst.zip doesn't exist.

The bug in Get-ChocolateyUnzip in Chocolatey Licensed Extension 3.0.0 only occurred for the root folder if it had a \ at the end. It always worked for C: for example. 7Zip here is extracting to C:

FLeven commented 2 years ago

It all worked on 11.3 and 2.2.1, nothing has changed except chocolatey versions.

FLeven commented 2 years ago

Ok, I rolled back everything (including original packages from month ago) and everything is working without any problems. Except adobereader, where I could not find an old package, this demonstrates, that something has changed with everything packaged on newer versions.

choco 0.11.3 extension 2.2.1

my choco config remained the same:

choco source remove --name="'chocolatey'"
choco feature enable --name="'allowGlobalConfirmation'"
choco feature disable --name="'showDownloadProgress'"
choco config set --name="'cacheLocation'" --value="'$env:ChocolateyInstall\choco-cache'"
choco config set --name="'commandExecutionTimeoutSeconds'" --value="'14400'"

choco upgrade chocolatey-license
choco source disable --name="'chocolatey.licensed'"

choco upgrade chocolatey.extension --params="'/NoContextMenu'"

choco upgrade chocolatey-agent

choco feature enable --name="'useChocolateyCentralManagement'"
choco feature disable --name="'reduceInstalledPackageSpaceUsage'"
choco config set --name="'centralManagementReportPackagesTimerIntervalInSeconds'" --value="'1800'"
choco config set --name="'centralManagementServiceUrl'" --value="'https://xxx:24020/ChocolateyManagementService'"
choco config set --name="'centralManagementReceiveTimeoutInSeconds'" --value="'60'"
choco config set --name="'centralManagementSendTimeoutInSeconds'" --value="'60'"
choco config set --name="'centralManagementCertificateValidationMode'" --value="'PeerOrChainTrust'"`

As mentioned before, I am using choco in MDT and that's why I believe that something has changed with "choco pack", "environment variables (TEMP)", packaging or the way choco uses it's own "powershell shell". 

Only some internalized packages caused problems like adobereader, fslogix, corretto8jre and vcredist140(2013,2008), pdf24 always worked fine. 

Alomst all internal package never had any problems only this chocinstall.ps1 stopped working, beginning with extensions 3.0.0 and 3.1.0;

`$ErrorActionPreference = 'Stop'
$packageName    = 'app_tst'
$softwareName   = 'app_tst'
$toolsDir       = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
$url            = ''
$checksum       = ''
$silentArgs     = '/S'
$validExitCodes = @(0,1)
$fileLocation = Join-Path $toolsDir 'app_tst.zip'

$packageArgs = @{
  packageName    = $packageName
  Destination    = 'c:'
  FileFullPath   = $fileLocation
}

Get-ChocolateyUnzip @packageArgs
Remove-Item $fileLocation | out-null`

If you consider this an edge case, please close the issue, but I doubt that my environment will only break some packages and not all of them.

pauby commented 2 years ago

Bear in mind that any package that has been internalized with version 3.0.0+ of Chocolatey Licensed Extension will not be able to be installed with Chocolatey open source or a version of Chocolatey Licensed Extension less than 3.0.0.

If you haven't already done so, can I ask you to run choco support to see what your options are and raise a Support ticket? Mention this issue number. They will be able to gather logs and more information.

FLeven commented 2 years ago

I know, that's when all the trouble startet.

gep13 commented 2 years ago

@FLeven can you confirm whether you have reached out to the support team regarding this problem?

FLeven commented 2 years ago

Yes, before and after I reported the issue on Github.

pauby commented 2 years ago

For future reference, I've updated the original message with the Zendesk ticket.

FLeven commented 2 years ago

I still have this problem..

But I believe I got to the root cause of the problem. Past versions (Working): 2021-10-24 10:07:33,684 5804 [DEBUG] - Executing command ['C:\ProgramData\chocolatey\helpers..\tools\checksum.exe' -c="6230414ae6e20555aebecb5291273c4bdcc5aa9a8272691d81c692820c2c1c55b66d68e77b38528e71c9213c5543635618317762ba8fbde93b171a8774a7b24c" -t="SHA512" -f="C:\Users\Administrator\AppData\Local\Temp\1\chocolatey\AcroRdrDCUpd2100720099_MUI.msp"] 2021-10-24 10:07:35,677 5804 [DEBUG] - Command ['C:\ProgramData\chocolatey\helpers..\tools\checksum.exe' -c="6230414ae6e20555aebecb5291273c4bdcc5aa9a8272691d81c692820c2c1c55b66d68e77b38528e71c9213c5543635618317762ba8fbde93b171a8774a7b24c" -t="SHA512" -f="C:\Users\Administrator\AppData\Local\Temp\1\chocolatey\AcroRdrDCUpd2100720099_MUI.msp"] exited with '0'.

Current Version (12.1 still failing): 022-03-01 16:30:41,035 4416 [DEBUG] - Executing command ['C:\ProgramData\chocolatey\tools\checksum.exe' -c="8a854f2bd07229cb43901f7cec8755b8dde9eeea5671230cc573970ced299f687af5d22b3c962e454058d09bf6edeb8448aacb56f6fb1bf65ef9017a9b875d61" -t="SHA512" -f="C:\ProgramData\chocolatey\choco-cache\AcroRdrDCUpd2101120039_MUI.msp"] 2022-03-01 16:30:41,035 4416 [DEBUG] - Calling command ['"C:\ProgramData\chocolatey\tools\checksum.exe" -c="8a854f2bd07229cb43901f7cec8755b8dde9eeea5671230cc573970ced299f687af5d22b3c962e454058d09bf6edeb8448aacb56f6fb1bf65ef9017a9b875d61" -t="SHA512" -f="C:\ProgramData\chocolatey\choco-cache\AcroRdrDCUpd2101120039_MUI.msp"']

As this fails in two circumstances on my side 1) checksum.exe 2) 7z.exe is called and in both cases the newer chocolatey versions added single quotes around the full command, I believe this caused the "folder not found" error in my automated installs.

pauby commented 2 years ago

@FLeven As this is a licensed issue and you've already raised a ticket for it, can you deal with Support for any follow-ups? We are unable to support you via this GitHub issue in a timely way. The Support team will be able to troubleshoot the issue and establish the root cause which we then track here into a fix, should it be needed.

FLeven commented 2 years ago

Ok, but might happen to other versions too, if the choco install script is startet from a windows task or if a CMD starts a PS1 to install packages etc.

pauby commented 2 years ago

@FLeven I didn't mean for you to close the issue. We can look at the outcome of the Zendesk tickets and update this with the solution / remediation we need to take. But Support can look at things in private that we can't do here.

FLeven commented 2 years ago

Workaround is to run chocolatey in CMD only.

Other options would have been to add "--use-system-powershell", but this seems not to be compatible with the license check anymore. I could also stay on version 11.3 for example, it still workks without any problems.

pauby commented 2 years ago

I wanted to confirm that this was closed as we could not reproduce the issue either above or within the Zendesk ticket that was raised.