4

As part of managing environments, I want to install Visual Studio 2017 via the command line. However, I'm running into issues installing 2017 that wasn't encountered setting up 2015. Following the documentation I've got a simple Powershell script:

Start-Process C:\\windows\\temp\\vs2017\\vs_professional_2017 --ArgumentList "/Quiet /NoRestart /Log C:\\Windows\\Temp\\InstallVs2017\\install.log" -Wait

Which worked just fine for VS2015. And it does start the installation, but after a couple of seconds displays the dialog box for accepting the privacy statement and license terms. I can't seem to find a --accepteula flag or something similar to get past it (on a side note, I would have thought that given quiet is supposed to suppress the UI that it would suppress this as well). There is a comment on this issues in the documentation, but they couldn't figure out a way past it. How do you automatically accept it? I feel like I'm missing something obvious, but I have yet to figure it out.

JosephRT
  • 141
  • 1
  • 1
  • 3

3 Answers3

3

Try these switches, individually and combination, or else open the MSI with Orca and change the EULA variable.

ACCEPT=YES
ACCEPTEULA=1
ASSOCIATE=1
spacenomyous
  • 1,319
  • 6
  • 15
0

Powerbi msi accepts "ACCEPT_EULA=1" . You can give it a try if everything fails for Visual Studio 2017.

Aravinda
  • 1,081
  • 5
  • 12
  • 30
0

I did actually manage to get this to work. The first problem is that options can no longer be denoted with /, they have to be denoted with --. Apparently / is disallowed now, I had missed that somewhere.

I also dropped the /Log option. It doesn't exist as a option for VS2017, although if you still need to get the installation logs they do have a way to get them.

After making those changes, VS2017 installed successfully without me having to manually accept the terms; it wasn't picking up the options because I wasn't using --. I also added .exe for completionist's sake to the executable.

Start-Process C:\\windows\\temp\\vs2017\\vs_professional_2017.exe --ArgumentList "--quiet --norestart" -Wait

JosephRT
  • 141
  • 1
  • 1
  • 3