1

How can I specify the target directory for the LibreOffice 4.0.2.2 .msi installation?

The .msi file is here: http://downloadarchive.documentfoundation.org/libreoffice/old/4.0.2.2/win/x86/LibreOffice_4.0.2.2_Win_x86.msi

The following script installs LibreOffice in C:\Program Files (x86):

msiexec.exe /qn /norestart /Lime .Npackd\InstallMSI.log /i ".Npackd\LibreOffice_4.0.2.2_Win_x86.msi" TARGETDIR="C:\Users\t\Downloads" ALLUSERS=1 MSIFASTINSTALL=7
6
  • Try passing the TARGETDIR option prior to the /i option; there may be some odd precedence behavior there. The .msi file may also be built in such a way that its target directory can't be overridden on the command line; in that case you'd need to unpack the .msi's contents, modify the target directory, and then repack the modified contents into a new .msi file. Apr 17, 2013 at 18:42
  • ...also, if you're trying to do a user-specific install, why specify the ALLUSERS option? Apr 17, 2013 at 18:43
  • 1
    C:\Users\t\Downloads is just for testing. It could be anything like F:\LibreOffice. The application should be installed for all users.
    – kaboom
    Apr 17, 2013 at 18:47
  • What version of Windows are you using?
    – ChimneyImp
    Apr 17, 2013 at 19:22
  • I test it on an XP VM. Let me know if you could make it work at least on one Windows version.
    – kaboom
    Apr 18, 2013 at 17:25

1 Answer 1

2
+50

It looks like LibreOffice wants to use INSTALLLOCATION instead of TARGETDIR, according to their wiki.

Try this: msiexec.exe /qn /norestart /Lime .Npackd\InstallMSI.log /i ".Npackd\LibreOffice_4.0.2.2_Win_x86.msi" INSTALLLOCATION="C:\Users\t\Downloads" ALLUSERS=1 MSIFASTINSTALL=7

You must log in to answer this question.

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