-
Notifications
You must be signed in to change notification settings - Fork 931
Description
Checklist
- I confirm there are no unresolved issues reported on the Chocolatey Status page.
- I have verified this is the correct repository for opening this issue.
- I have verified no other issues exist related to my problem.
- I have verified this is not an issue for a specific package.
- I have verified this issue is not security related.
- I confirm I am using official, and not unofficial, or modified, Chocolatey products.
What You Are Seeing?
The package fails install as I have specified 'install.msi' in $fileLocation in the chocolateyinstall.ps1 and on the filesystem under username\appdata\local\temp\chocolatey\packagename\version directory, the file is being renamed with the %Packagename% appended before the install.msi, leaving a file called packagenameinstall.msi, which causes the installation to fail. I have copied and pasted this altered filename and renamed it to 'install.msi', like i specified, and the install then works. $packageargs has the urls removed as well as checksum, as the install.msi file is located in the tools directory. File = $filelocation as well. Why does Get-ChocolateyWebFile appear to run at all then the msi is included and there is no reason for web anything? Install command at elevated cmd prompt windows choco install packagename -dv --source . from the choco package directory. choco 2.5.0 client being used.
What is Expected?
I expect the filename specified in the chocolateyinstall.ps1 to be used, and not have the packagename appended to the msi file name, causing the install to fail.
How Did You Get This To Happen?
- choco install packagename -dv --source . from the choco package directory, install fails.
- copy and paste packagenameinstall.msi to install.msi, as I have specified, and run again. The install succeeds.
System Details
- Operating System: Win11 enterprise
- Windows PowerShell version: 5.1
- Chocolatey CLI Version: 2.5.0
- Chocolatey Licensed Extension version:
- Chocolatey License type:
- Terminal/Emulator: Windows Terminal elevated
Installed Packages
chocolatey 2.5.0
chocolatey-compatibility.extension 1.0.0
chocolatey-core.extension 1.4.0
chocolatey-windowsupdate.extension 1.0.5
Output Log
Running 'ChocolateyScriptRunner' for packagename v4.5.0.337 with packageScript 'C:\ProgramData\chocolatey\lib\packagename\tools\chocolateyinstall.ps1', packageFolder:'C:\ProgramData\chocolatey\lib\packagename', installArguments: '', packageParameters: '', preRunHookScripts: '', postRunHookScripts: '',
Running package script 'C:\ProgramData\chocolatey\lib\packagename\tools\chocolateyinstall.ps1'
System.Collections.Hashtable
Running Install-ChocolateyPackage -silentArgs 'TRANSFORMS='Install.mst' /qn /norestart /l*v "C:\Users\installapps\AppData\Local\Temp\chocolatey\packagename.4.5.0.337.MsiInstall.log"' -file 'C:\ProgramData\chocolatey\lib\packagename\tools\install.msi' -fileType 'MSI' -validExitCodes '0 3010 1641 1707 1618' -packageName 'packagename'
Running Get-ChocolateyWebFile -packageName 'packagename' -fileFullPath 'C:\Users\installapps\AppData\Local\Temp\chocolatey\packagename\4.5.0.337\packagenameInstall.MSI' -url 'C:\ProgramData\chocolatey\lib\packagename\tools\install.msi' -url64bit '' -checksum '' -checksumType '' -checksum64 '' -checksumType64 '' -options 'System.Collections.Hashtable' -getOriginalFileName 'True'
Running Get-OSArchitectureWidth -compare '64'
CPU is 64 bit
Running Get-WebFileName -url 'C:\ProgramData\chocolatey\lib\packagename\tools\install.msi' -defaultName 'packagenameInstall.MSI'
Attempt to use original download file name failed for 'C:\ProgramData\chocolatey\lib\packagename\tools\install.msi'.
Copying packagename
from 'C:\ProgramData\chocolatey\lib\packagename\tools\install.msi'
No runtime virus checking built into FOSS Chocolatey. Check out Pro/Business - https://chocolatey.org/compare
Running Install-ChocolateyInstallPackage -packageName 'packagename' -fileType 'MSI' -silentArgs 'TRANSFORMS='Install.mst' /qn /norestart /l*v "C:\Users\installapps\AppData\Local\Temp\chocolatey\packagename.4.5.0.337.MsiInstall.log"' -file 'C:\Users\installapps\AppData\Local\Temp\chocolatey\packagename\4.5.0.337\packagenameInstall.MSI' -validExitCodes '0 3010 1641 1707 1618' -useOnlyPackageSilentArguments 'False'
Running Get-OSArchitectureWidth -compare '32'
Installing packagename...
Ensuring 'C:\Users\installapps\AppData\Local\Temp\chocolatey' exists
Running Start-ChocolateyProcessAsAdmin -validExitCodes '0 3010 1641 1707 1618' -workingDirectory 'C:\Users\installapps\AppData\Local\Temp\chocolatey\packagename\4.5.0.337' -statements '/i "C:\Users\installapps\AppData\Local\Temp\chocolatey\packagename\4.5.0.337\packagenameInstall.MSI" TRANSFORMS='Install.mst' /qn /norestart /l*v "C:\Users\installapps\AppData\Local\Temp\chocolatey\packagename.4.5.0.337.MsiInstall.log"' -exeToRun 'C:\Windows\System32\msiexec.exe'
Running Test-ProcessAdminRights
Test-ProcessAdminRights: returning True
Finishing 'Test-ProcessAdminRights'
Elevating permissions and running ["C:\Windows\System32\msiexec.exe" /i "C:\Users\installapps\AppData\Local\Temp\chocolatey\packagename\4.5.0.337\packagenameInstall.MSI" TRANSFORMS='Install.mst' /qn /norestart /l*v "C:\Users\installapps\AppData\Local\Temp\chocolatey\packagename.4.5.0.337.MsiInstall.log"]. This may take a while, depending on the statements.
Command ["C:\Windows\System32\msiexec.exe" /i "C:\Users\installapps\AppData\Local\Temp\chocolatey\packagename\4.5.0.337\packagenameInstall.MSI" TRANSFORMS='Install.mst' /qn /norestart /l*v "C:\Users\installapps\AppData\Local\Temp\chocolatey\packagename.4.5.0.337.MsiInstall.log"] exited with '1603'.
WARNING: Generic MSI Error. This is a local environment error, not an issue with a package or the MSI itself - it could mean a pending reboot is necessary prior to install or something else (like the same version is already installed). Please see MSI log if available. If not, try again adding '--install-arguments="'/l*v c:\packagename_msi_install.log'"'. Then search the MSI Log for "Return Value 3" and look above that for the error.
ERROR: Running ["C:\Windows\System32\msiexec.exe" /i "C:\Users\installapps\AppData\Local\Temp\chocolatey\packagename\4.5.0.337\packagenameInstall.MSI" TRANSFORMS='Install.mst' /qn /norestart /l*v "C:\Users\installapps\AppData\Local\Temp\chocolatey\packagename.4.5.0.337.MsiInstall.log"] was not successful. Exit code was '1603'. Exit code indicates the following: Generic MSI Error. This is a local environment error, not an issue with a package or the MSI itself - it could mean a pending reboot is necessary prior to install or something else (like the same version is already installed). Please see MSI log if available. If not, try again adding '--install-arguments="'/l*v c:\packagename_msi_install.log'"'. Then search the MSI Log for "Return Value 3" and look above that for the error..
at Start-ChocolateyProcessAsAdmin, C:\ProgramData\chocolatey\helpers\functions\Start-ChocolateyProcessAsAdmin.ps1: line 396
at Install-ChocolateyInstallPackage, C:\ProgramData\chocolatey\helpers\functions\Install-ChocolateyInstallPackage.ps1: line 345
at Install-ChocolateyPackage, C:\ProgramData\chocolatey\helpers\functions\Install-ChocolateyPackage.ps1: line 423
at <ScriptBlock>, C:\ProgramData\chocolatey\lib\packagename\tools\chocolateyinstall.ps1: line 19
at <ScriptBlock>, C:\ProgramData\chocolatey\helpers\chocolateyScriptRunner.ps1: line 63
at <ScriptBlock>, <No file>: line 1
Additional Context
I am not sure why the packagename is being appended to the filename, causing the install to fail.