Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

The .msi file is here:

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
share|improve this question

migrated from Apr 14 '13 at 18:12

This question came from our site for professional and enthusiast programmers.

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. – Aaron Miller Apr 17 '13 at 18:42
...also, if you're trying to do a user-specific install, why specify the ALLUSERS option? – Aaron Miller Apr 17 '13 at 18:43
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 '13 at 18:47
What version of Windows are you using? – ChimneyImp Apr 17 '13 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 '13 at 17:25
up vote 2 down vote accepted

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

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.