Visual Studio 2015 unattended install from shared drive with packages

1

I am trying to create a chocolatey package to perform an unattended install of Visual Studio 2015 Enterprise. This will be something that we use internally so we have a network share that contains the vs_enterprise.exe executable. The network share also contains a packages folder that has the Visual Studio packages that you can choose to install when installing Visual Studio. Ex: Windows Dev Tools, Xamarin SDKs, FSharp SDK, etc...

Using the following command to install using chocolatey, I get an error when it attempts to download packages from Microsoft: choco install -fdv <path to nuspec>

This is the error from the logs:

[1E34:1D5C][2016-06-03T17:54:54]w343: Prompt for source of package: Preparation_Uninstall_vs_enterprise, payload: Preparation_Uninstall_vs_enterprise, path: C:\Users\myuser\AppData\Local\Temp\chocolatey\VisualStudio2015Enterprise\14.0.25123.00\packages\vs_enterprise\Preparation.exe
[1E34:1C6C][2016-06-03T17:54:54]i000: MUX:  Vital packages to be installed: 24
[1E34:1C6C][2016-06-03T17:54:54]i000: MUX:  Total packages to be installed: 141
[1E34:1D5C][2016-06-03T17:54:54]i000: MUX:  Next Source: Web, Attempted: 1, Limit:3
[1E34:1D5C][2016-06-03T17:54:54]i000: MUX:  Source retrieved: Web
[1E34:1C6C][2016-06-03T17:54:54]i000: MUX:  Updating progress percentages: Burn: 0.635617296502411, Secondary installer: 0.364382703497589
[1E34:1D5C][2016-06-03T17:54:54]i000: MUX:  Package:Preparation_Uninstall_vs_enterprise, PayloadId:Preparation_Uninstall_vs_enterprise Url: bits://go.microsoft.com/fwlink/?prd=12514&pver=Dev14&sbp=d14rel&plcid=0x409&clcid=0x409&ar=25123.00.00&sar=S80_RCPrep&o1=3B4A490AB282CB3A99A329F3C8715B20B7A0BFB1, Attempting count: 1
[1E34:1D5C][2016-06-03T17:54:54]i000: MUX:  Existing last unconfirmed source: Web
[1E34:1D5C][2016-06-03T17:54:54]i338: Acquiring package: Preparation_Uninstall_vs_enterprise, payload: Preparation_Uninstall_vs_enterprise, download from: bits://go.microsoft.com/fwlink/?prd=12514&pver=Dev14&sbp=d14rel&plcid=0x409&clcid=0x409&ar=25123.00.00&sar=S80_RCPrep&o1=3B4A490AB282CB3A99A329F3C8715B20B7A0BFB1
[0F1C:1850][2016-06-03T17:54:54]e000: Error 0x800b0003: Failed authenticode verification of payload: C:\ProgramData\Package Cache\.unverified\Preparation_Uninstall_vs_enterprise
[0F1C:1850][2016-06-03T17:54:54]e000: Error 0x800b0003: Failed to verify signature of payload: Preparation_Uninstall_vs_enterprise
[0F1C:1850][2016-06-03T17:54:54]e310: Failed to verify payload: Preparation_Uninstall_vs_enterprise at path: C:\ProgramData\Package Cache\.unverified\Preparation_Uninstall_vs_enterprise, error: 0x800b0003, delete: Yes
[0F1C:1850][2016-06-03T17:54:54]e000: Error 0x800b0003: Failed to cache payload: Preparation_Uninstall_vs_enterprise
[1E34:1D5C][2016-06-03T17:54:54]i000: MUX:  Set Result: Return Code=-2146762749 (0x800B0003), Error Message=, Result Detail=, Vital=False, Package Action=Verify, Package Id=Preparation_Uninstall_vs_enterprise
[1E34:1D5C][2016-06-03T17:54:54]e314: Failed to cache payload: Preparation_Uninstall_vs_enterprise from working path: C:\Users\myuser\AppData\Local\Temp\{675a5109-38d6-406c-9e75-d0e922f87a58}\Preparation_Uninstall_vs_enterprise, error: 0x800b0003.
[1E34:1D5C][2016-06-03T17:54:54]e349: Application requested retry of payload: Preparation_Uninstall_vs_enterprise, encountered error: 0x800b0003. Retrying...

However, if I install manually by double clicking on the vs_enterprise.exe file on the network share, the logs show that the packages are being installed from the network share, and Visual Studio installs correctly.

[0AE8:081C][2016-06-03T17:21:59]i338: Acquiring package: Preparation_Uninstall_vs_enterprise, payload: Preparation_Uninstall_vs_enterprise, copy from: \\network\share\Visual Studio 2015 Enterprise with Update 2\packages\vs_enterprise\Preparation.exe

Is there a way I can force the unattended install to look for packages on the network share instead of trying to download them?

windows
visual-studio-2015
chocolatey
asked on Stack Overflow Jun 3, 2016 by Levi Hinze • edited Jun 4, 2016 by agabrys

1 Answer

1

Chocolatey Install Function With No Download - Install-ChocolateyInstallPackage

Yes, that is supported, but you need a different helper. You didn't post your script, so I get to assume you are using Install-ChocolateyPackage (you ran choco new visualstudio2015 to create the package, right?).

Check out the documentation for the Chocolatey PowerShell functions for a complete reference.

Install-ChocolateyPackage mentions the following:

Installs software into "Programs and Features" based on a remote file download. Use Install-ChocolateyInstallPackage when local or embedded file.

There is a function called Install-ChocolateyInstallPackage that just uses the file where ever it is, whether embedded in the package or on a local file share.

Don't call choco install nuspec

Calling choco install with a path to a nuspec is probably what is actually causing the errors you are seeing. That is used mostly for testing - choco has to compile the package to be able to run the install and it may be attempting to bring things local to do that. So run choco pack against that nuspec to compile the package first.

It is recommended you call choco install visualstudio2015 --source \\the_share\folder_with_compiled_nupkgs.

There should be a compiled visualstudio2015.version.nupkg in that folder, which is the compiled nuspec.

If you want more in depth information, see https://chocolatey.org/docs/commands-install#examples

HTH

answered on Stack Overflow Jun 6, 2016 by ferventcoder

User contributions licensed under CC BY-SA 3.0