0

How to install 7z from powershell to a specified directory? I am trying to do so using the msi/exe available here: https://www.7-zip.org/download.html

The installtion always gets happends to "C:/Program Files/7-zip" even with below command:

  msiexec /i "7z1604-x64.msi" TARGETDIR="C:\Downloads" /q

How can I choose the installation path?

Sayantan Ghosh
  • 836
  • 2
  • 9
  • 27
  • Are you sure about the msi property? If I'm not wrong it should be `INSTALLDIR` instead of `TARGETDIR` – Olaf Jun 05 '20 at 09:02

1 Answers1

0

It seems that msiexec /i doesn't respect TARGET parameret but try Administrative Installation:

msiexec /a "7z1604-x64.msi" TARGETDIR="C:\Downloads" /q

Install msi with msiexec in a Specific Directory

But why somebody still needs 2016 version 7z in 2020?

lain0
  • 61
  • 4
  • 5