jberezanski / ChocolateyPackages

Chocolatey packages maintained by me
MIT License
86 stars 52 forks source link

Offline installation fails when using --in parameter #60

Closed Icebreaker83 closed 8 months ago

Icebreaker83 commented 5 years ago

Reproduction steps: 1.cinst visualstudio2017enterprise --params "--bootstrapperPath ""C:\offlineInstallFolder\vs_enterprise.exe"" --in ""C:\offlineInstallFolder\installTemplate.json""" -y

  1. Installation fails with ERROR: ERROR: Running ["C:\Users\\AppData\Local\Temp\chocolatey\visualstudio2017enterprise\15.9.8.0\vs_enterprise.exe" --quiet --installLayoutPathC:\offlineInstallFolder\installTemplate.json --norestart --wait] was not successful. Exit code was '1'. See log for possible error messages.

Space is missing between --installLayoutPath and C:\offlineInstallFolder\installTemplate.json

jberezanski commented 8 months ago

Apologies, I have no idea why I missed this issue until now. It's probably not relevant anymore, but it could have been a quoting issue. The Visual Studio packages do not need any quotes inside the --params (--package-parameters) value (even if the paths would contain spaces), so the choco command could be written as:

cinst visualstudio2017enterprise --params "--bootstrapperPath C:\offlineInstallFolder\vs_enterprise.exe --in C:\offlineInstallFolder\installTemplate.json" -y

Please reopen if needed.