Question

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
Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top