0

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

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.

3

1 Answer 1

0

For this to properly work you need to perform these steps:

  1. Get list of public properties used in your .msi installer:
    • PS >.\YourAppInstaller.msi /lp! YourAppInstall.log;
    • Cancel installation;
  2. Find public properties in .log file generated in previous step;
  3. Run your .msi with public property from command line:
    • If your property value contains spaces, then wrap it in backtick+quote pair (`")
    • Example: PS >.\YourAppInstaller.msi YOUR_PROP=`"value with spaces`"

In case of Blender silent installation, to specify an install path, you need to call installer as follows (as an example):

.\blender-3.4.1-windows-x64.msi INSTALL_ROOT=`"C:\Program Files\Blender Foundation\Blender\`"

This way it will understand where you want it to be installed.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .