Here's my attempt to install .msi using msiexec in Administrative PowerShell on Windows 10.
I've made it 7 times for each of 2 drives, C: and D: (14 total) with different arguments in place of ARG and the same desirable path value.
Template: PS C:\WINDOWS\system32> msiexec /i D:\users\username\downloads\soft\publisher\softwarename\software.msi /passive ARG="D:\Soft\publisher\softwarename"
ARGs:
TARGETDIR,INSTALLDIR,INSTALLPATH,INSTALLFOLDER,INSTALLLOCATION,APPLICATIONFOLDER,APPDIR- When running on the same drive as
set in the parameter: installs on this drive in a default folder
(e.g.
D:\Blender Foundation\Blender\2.81\) - When running from a differnet drive: seems to do nothing
- When running on the same drive as
set in the parameter: installs on this drive in a default folder
(e.g.
Is there a workaround to this behavior?
Update 1
Tested it on another .msi package (Blender 2.81), because previous was built incorrectly. None of the argument names listed above did the trick. Every install even from a D: drive was on default folder on C:.
Update 2
For Blender 2.81, as, I suppose, for any .msi packed with WiX, it was INSTALL_ROOT. You could try msiexec /lp! <msi_property_logfile> /i <msi_name> for any .msi to find out the name of the installation path argument. Thanks to YenForYang and his answer here.