jberezanski / ChocolateyPackages

Chocolatey packages maintained by me
MIT License
83 stars 51 forks source link

allow bootstrapper to work behind coporate proxy. #137

Open flucas1 opened 1 year ago

flucas1 commented 1 year ago

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" ?

jberezanski commented 1 year ago

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.

saper commented 11 months ago

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)...