Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chocolatey install fails on Windows 7 x86 trial #59

Closed
obilodeau opened this issue Jul 11, 2017 · 3 comments
Closed

Chocolatey install fails on Windows 7 x86 trial #59

obilodeau opened this issue Jul 11, 2017 · 3 comments

Comments

@obilodeau
Copy link
Member

obilodeau commented Jul 11, 2017

Another .Net 4.0 installer error on chocolatey install:

ERROR: .NET Framework install failed with exit code '5'.

It's not the same issue as #31 even though it is very similar. Exit code 5 has been associated with permissions errors online.

Full trace:

==> virtualbox-iso: Provisioning with shell script: /home/olivier/Documents/gosecure/src/malboxes/malboxes/scripts/windows/installtools.ps1
    virtualbox-iso: 
    virtualbox-iso: Mode                LastWriteTime     Length Name
    virtualbox-iso: ----                -------------     ------ ----
    virtualbox-iso: d----         7/11/2017   9:27 AM            chocInstall
    virtualbox-iso: Unable to set PowerShell to use TLS 1.2 and TLS 1.1 due to old .NET Framework i
    virtualbox-iso: nstalled. If you see underlying connection closed or trust errors, you may need
    virtualbox-iso: to do one or more of the following: (1) upgrade to .NET Framework 4.5+ and Pow
    virtualbox-iso: erShell v3, (2) specify internal Chocolatey package location (set $env:chocolat
    virtualbox-iso: eyDownloadUrl prior to install or host the package internally), (3) use the Dow
    virtualbox-iso: nload + PowerShell method of install. See https://chocolatey.org/install for al
    virtualbox-iso: l install options.
    virtualbox-iso: Getting latest version of the Chocolatey package for download.
    virtualbox-iso: Getting Chocolatey from https://chocolatey.org/api/v2/package/chocolatey/0.10.7
    virtualbox-iso: .
    virtualbox-iso: Downloading 7-Zip commandline tool prior to extraction.
    virtualbox-iso: Extracting C:\Users\malboxes\AppData\Local\Temp\chocolatey\chocInstall\chocolat
    virtualbox-iso: ey.zip to C:\Users\malboxes\AppData\Local\Temp\chocolatey\chocInstall...
    virtualbox-iso: #< CLIXML
    virtualbox-iso: Installing chocolatey on this machine
    virtualbox-iso: Creating ChocolateyInstall as an environment variable (targeting 'Machine')
    virtualbox-iso: Setting ChocolateyInstall to 'C:\ProgramData\chocolatey'
    virtualbox-iso: WARNING: It's very likely you will need to close and reopen your shell
    virtualbox-iso: before you can use choco.
    virtualbox-iso: Restricting write permissions to Administrators
    virtualbox-iso: We are setting up the Chocolatey package repository.
    virtualbox-iso: The packages themselves go to 'C:\ProgramData\chocolatey\lib'
    virtualbox-iso: (i.e. C:\ProgramData\chocolatey\lib\yourPackageName).
    virtualbox-iso: A shim file for the command line goes to 'C:\ProgramData\chocolatey\bin'
    virtualbox-iso: and points to an executable in 'C:\ProgramData\chocolatey\lib\yourPackageName
    virtualbox-iso: '.
    virtualbox-iso:
    virtualbox-iso: Creating Chocolatey folders if they do not already exist.
    virtualbox-iso:
    virtualbox-iso: WARNING: You can safely ignore errors related to missing log files when
    virtualbox-iso: upgrading from a version of Chocolatey less than 0.9.9.
    virtualbox-iso: 'Batch file could not be found' is also safe to ignore.
    virtualbox-iso: 'The system cannot find the file specified' - also safe.
    virtualbox-iso: chocolatey.nupkg file not installed in lib.
    virtualbox-iso: Attempting to locate it from bootstrapper.
    virtualbox-iso: PATH environment variable does not have C:\ProgramData\chocolatey\bin in it. Adding...
    virtualbox-iso: 'C:\Windows\Microsoft.Net\Framework\v4.0.30319' was not found or this is forced
    virtualbox-iso: Downloading 'https://download.microsoft.com/download/9/5/A/95A9616B-7A37-4AF6-B
    virtualbox-iso: C36-D6EA96C8DAAE/dotNetFx40_Full_x86_x64.exe' to 'C:\Users\malboxes\AppData\Loc
    virtualbox-iso: al\Temp\dotNetFx40_Full_x86_x64.exe' - the installer is 40+ MBs, so this could
    virtualbox-iso: take a while on a slow connection.
    virtualbox-iso: Installing 'C:\Users\malboxes\AppData\Local\Temp\dotNetFx40_Full_x86_x64.exe' -
    virtualbox-iso: this may take awhile with no output.
    virtualbox-iso: WARNING: Try #1 of .NET framework install failed with exit code '5'. Trying again.
    virtualbox-iso: 'C:\Windows\Microsoft.Net\Framework\v4.0.30319' was not found or this is forced
    virtualbox-iso: Installing 'C:\Users\malboxes\AppData\Local\Temp\dotNetFx40_Full_x86_x64.exe' -
    virtualbox-iso: this may take awhile with no output.
    virtualbox-iso: ERROR: .NET Framework install failed with exit code '5'.
    virtualbox-iso: This will cause the rest of the install to fail.

Still investigating.

@obilodeau
Copy link
Member Author

When done manually over the RDP session, error is different: .Net 4.0 installs successfully but trying to use choco yields a .Net missing error.

localhost 5935 - remote desktop viewer_134

But you can see that .Net successfully installed

localhost 5935 - remote desktop viewer_135

@obilodeau
Copy link
Member Author

Using elevated_user the problem is different now...

obilodeau added a commit that referenced this issue Jul 11, 2017
Had new issues during testing with latest version of chocolatey and .Net
framework 4.0 installer. Workaround found and integrated. See #59.
@obilodeau
Copy link
Member Author

This was fixed by a combination of using elevated_user and rebooting the VM after chocolatey's install. Fix is in master now that we've merged Windows 7 trial support #64.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant