ChocolateyPackages icon indicating copy to clipboard operation
ChocolateyPackages copied to clipboard

allow bootstrapper to work behind coporate proxy.

Open flucas1 opened this issue 3 years ago • 2 comments

The bootstraper is not proxy friendly.

The settings needs to be applied modified the .config file after unboxing the initial file. See for example https://bycode.dev/2021/08/06/how-to-install-visual-studio-2021-preview-behind-corporate-proxy/

The file Install-VStudioInstaller.ps1 has the logic to unbox the installer via the variable $shouldUnpackBox at line 154

The chocolatey package could be made proxy friendly if forcing the unpackbox when the user specifies a proxy from the command line, and the modify the vs_setup_bootstrapper.exe.config to include that proxy information.

If this cannot be implemented, is there a way to pass the bootstraperPath when doing "choco install visualstudio2022buildtools" ?

flucas1 avatar Sep 26 '22 19:09 flucas1

is there a way to pass the bootstraperPath

Yes, this should work:

choco install visualstudio2022buildtools --package-parameters "--bootstrapperPath C:\SomeDir\my_bootstrapper.exe"

The chocolatey package could be made proxy friendly...

I recognize the worth of such a feature. I probably won't implement it myself, but I would accept a PR.

jberezanski avatar Sep 26 '22 21:09 jberezanski

Good idea @flucas1 -I tried to follow the logic there and the debug log but unfortunately it seems that my local modifications to the Install-VStudioInstaller.ps1 file in the extensions\chocolatey-visualstudio seem to have any effect (even adding some simple Write-Debug commands)...

saper avatar Aug 01 '23 22:08 saper