Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Silent install of Vagrant to preferred directory on Windows

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
like image 443
030 Avatar asked Dec 12 '22 11:12

030


1 Answers

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.

like image 64
Christopher Painter Avatar answered May 01 '23 22:05

Christopher Painter