Silent install of Vagrant to preferred directory on Windows
Asked Answered
J

1

5

Description

  • Download vagrant.msi
  • Silent install vagrant to preferred directory by executing msiexec /qn /i C:\temp\vagrant.msi INSTALLDIR=C:\preferredVagrantDirectory

Expected Result

  • Vagrant has been installed in C:\preferredVagrantDirectory

Actual Result

  • Vagrant has been installed in C:\HashiCorp\Vagrant
Joist answered 21/9, 2013 at 11:42 Comment(3)
You should contact the vendor for support. Providing end user support for third party MSI's is outside of the scope of developer q&a.Valuate
Agreed. This question could be moved to SuperUser, but at least a reputation of 3K is required to perform this action.Joist
@utrecht the question cannot be migrated due to the age. Questions older than 60 days can't be migrated. You will have to keep it here.Omsk
V
13

Pass VAGRANTAPPDIR instead of INSTALLDIR.

It's admirable that they created an MSI but they should know that the default installation should be [ProgramFilesFolder]Company\Product not [WindowsVolume]Company\Product. (Actually they do know since they did a cute little Type 51 SETPROPERTY WINDOWSVOLUME = [WindowsVolume] so they could author the directory table in a way to get past the built in ICE validation unit tests that warn developers to not do this very thing. #FAIL

Also the use of unusual directory keys like VAGRANTAPPDIR only causes confusion. Stick with INSTALLDIR, INSTALLLOCATION or TARGETDIR for InstallShield, VDPROJ and WiX projects respectively.

Valuate answered 21/9, 2013 at 13:9 Comment(4)
Thank you. I have changed INSTALLDIR to VAGRANTAPPDIR and vagrant is installed to the preferred location.Joist
Agreed, but vote up requires 15 reputation and I only have 3. I have accepted the answerJoist
Is there any way to get some sort of progress bar/updates on the command line?Gobbet
You can do a /QR or /QB for a dialog that displays a progress bar but MSI doesn't support progress text at command line /stdout. You'd have to write your own custom console app that called the MSI API to perform the install then surface the progress as ascii text or something. I'm my 20+ years I've never seen anyone do this save one: blog.deploymentengineering.com/2010/09/…Valuate

© 2022 - 2024 — McMap. All rights reserved.